11name : CI
22on : ['push', 'pull_request']
33jobs :
4- phpstan :
5- name : PHP Static Analysis
6- runs-on : ubuntu-latest
7- steps :
8- - uses : actions/checkout@v2
9- - name : PHPStan
10- uses : docker://oskarstark/phpstan-ga
11- with :
12- args : analyse src/ -c phpstan.neon
13- tests :
14- name : Unit Tests for PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
4+ ci :
5+ name : PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
156 runs-on : ${{ matrix.os }}
167 strategy :
178 matrix :
18- os : [ubuntu-latest, macos-latest, windows-latest ]
19- php : ['7.4', '8.0', ' 8.1']
9+ os : [ubuntu-latest, macos-latest]
10+ php : ['8.1']
2011 dependency-version : [prefer-stable]
2112
2213 steps :
2718 uses : shivammathur/setup-php@v2
2819 with :
2920 php-version : ${{ matrix.php }}
30- extensions : fileinfo, spl, json, dom , mbstring, pcntl
21+ extensions : json, mbstring, pcntl
3122 ini-values : disable_functions, error_reporting=E_ALL
3223 tools : composer:v2
3324 coverage : xdebug
@@ -37,28 +28,17 @@ jobs:
3728 echo "::add-matcher::${{ runner.tool_cache }}/php.json"
3829 echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3930
40- - name : Install PHP 7 dependencies
31+ - name : Install PHP 8.1 dependencies
4132 run : composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
42- if : " matrix.php < 8"
43-
44- - name : Install PHP 8 dependencies
45- if : " matrix.php >= 8"
46- run : composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
47-
48- - name : Run Tests for PHP 7.4
49- if : " matrix.php == 7.4"
50- run : ./vendor/bin/pest --coverage
51-
52- - name : Run Tests for PHP 8.0
53- if : " matrix.php == 8.0"
54- run : ./vendor/bin/pest --coverage
55-
33+
34+ - name : PHP Static Analysis for PHP 8.1
35+ run : ./vendor/bin/phpstan
36+
5637 - name : Run Tests for PHP 8.1
57- if : " matrix.php == 8.1"
5838 run : ./vendor/bin/pest --coverage
5939
6040 support :
61- needs : [phpstan, tests ]
41+ needs : [ci ]
6242 name : Discord Notification
6343 runs-on : ubuntu-latest
6444 steps :
6848 with :
6949 webhook : ${{ secrets.WEBHOOK_TOKEN }}
7050 message : " **❤️ SUPPORT ONGOING DEVELOPMENT**\n ➡️ https://github.com/Awilum#support-me"
71-
0 commit comments