-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.09 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
name: CI
on: [push, pull_request]
jobs:
laravel-tests:
strategy:
matrix:
php: ['8.0', '8.1']
runs-on: ubuntu-latest
name: Test on PHP ${{ matrix.php }}
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v2
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Static analysis
run: php vendor/bin/phpstan analyse --no-progress
- name: Generate key
run: php artisan key:generate --env=testing
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install Node dependencies
run: npm install
- name: Build frontend code
run: npm run build
- name: Directory permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create database
run: |
mkdir -p database
touch database/database.sqlite
php artisan migrate --seed --env=testing
- name: Execute tests
run: php artisan test --without-tty --env=testing