99jobs :
1010 phpstan :
1111 runs-on : ubuntu-latest
12+ # define every php version to test
13+ strategy :
14+ # do not stop at first fail
15+ fail-fast : false
16+ matrix :
17+ php : [7.4, 8.2]
18+
1219 steps :
1320 - uses : actions/checkout@v4
1421
15- - name : Setup PHP 7.4 for dependencies
22+ - name : Setup PHP ${{ matrix.php }} for dependencies
1623 uses : shivammathur/setup-php@v2
1724 with :
18- php-version : 7.4
25+ php-version : ${{ matrix.php }}
1926
2027 - name : Install Dependencies
2128 run : composer update --ignore-platform-reqs
2229
23- - name : Setup PHP 8.2 for PHPStan
24- uses : shivammathur/setup-php@v2
25- with :
26- php-version : 8.2
27-
2830 - name : Restore PHPStan cache
2931 id : cache-phpstan
3032 uses : actions/cache/restore@v3
3133 with :
3234 path : phpstan.phar
3335 key : phpstan-1
3436
35- - name : Download PHPStan
36- if : steps.cache-phpstan.outputs.cache-hit != 'true'
37- run : wget https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar
38-
3937 - name : Run PHPStan
40- run : php phpstan.phar analyse --configuration phpstan.neon
38+ run : vendor/bin/ phpstan analyse --configuration phpstan.neon
4139
4240 update-baseline :
4341 needs : phpstan
4442 if : github.event_name == 'push' && github.ref == 'refs/heads/alpha'
4543 runs-on : ubuntu-latest
44+ # define every php version to test
45+ strategy :
46+ # do not stop at first fail
47+ fail-fast : false
48+ matrix :
49+ php : [7.4, 8.2]
4650 steps :
4751 - uses : actions/checkout@v4
4852 with :
@@ -54,22 +58,14 @@ jobs:
5458 git push origin --delete update-phpstan-baseline
5559 fi
5660
57- - name : Setup PHP 7.4 for dependencies
61+ - name : Setup PHP ${{ matrix.php }} for dependencies
5862 uses : shivammathur/setup-php@v2
5963 with :
60- php-version : 7.4
64+ php-version : ${{ matrix.php }}
6165
6266 - name : Install Dependencies
6367 run : composer update --ignore-platform-reqs
6468
65- - name : Setup PHP 8.2 for PHPStan
66- uses : shivammathur/setup-php@v2
67- with :
68- php-version : 8.2
69-
70- - name : Download PHPStan
71- run : wget https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar
72-
7369 - name : Generate new baseline
7470 id : generate-baseline
7571 run : |
0 commit comments