-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (44 loc) · 1.21 KB
/
laravel-9.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
name: Laravel 9
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
container:
image: laravelfans/laravel:9-dev
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: PHPUnit
env:
XDEBUG_MODE: coverage
run: |
composer require orchestra/testbench:^v7 --dev
./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
-
name: Lint
run: |
./vendor/bin/phpcs --standard=PSR12 src/ tests/
./vendor/bin/phpmd . text src/stubs/phpmd.xml
-
name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: laravel-9
token: ${{ secrets.CODECOV_TOKEN }}
-
name: install in real Laravel project
run: |
rm -rf laravel-demo
composer create-project --prefer-dist laravel/laravel laravel-demo "9.*"
cd laravel-demo && composer require --dev laravel-fans/lint:dev-${{ github.ref_name }} && php artisan lint:publish
php artisan lint:code --help
php artisan lint:code database/