-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (63 loc) · 1.98 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on: [push]
jobs:
phpstan:
runs-on: ubuntu-latest
container:
image: lorisleiva/laravel-docker:8.2
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: Cache Composer dependencies
id: cache-composer
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-${{ hashFiles('composer.lock') }}
- name: Install Composer dependencies
if: steps.cache-composer.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Copy environment file
run: cp .env.example .env
- name: Run PHPStan
run: vendor/bin/phpstan --memory-limit=1G
pestphp:
runs-on: ubuntu-latest
container:
image: lorisleiva/laravel-docker:8.2
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: Cache Composer dependencies
id: cache-composer
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-${{ hashFiles('composer.lock') }}
- name: Install Composer dependencies
if: steps.cache-composer.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Copy environment file
run: cp .env.example .env
- name: Generate Laravel key
run: php artisan key:generate
- name: Run Pest tests
run: php artisan test
vitest:
runs-on: ubuntu-latest
container:
image: lorisleiva/laravel-docker:8.2
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: Cache Node dependencies
id: cache-node
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install Node dependencies
if: steps.cache-node.outputs.cache-hit != 'true'
run: npm install -g pnpm && pnpm install
- name: Run vitest tests
run: npm run test