11name : CI
22
3- on : [push]
3+ on :
4+ push :
5+ branches : [master]
6+ pull_request :
47
58jobs :
6- build- test :
9+ test :
710 runs-on : ubuntu-latest
811 strategy :
912 fail-fast : false
1013 matrix :
11- php-versions : ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
12- name : PHP ${{ matrix.php-versions }} Test
14+ php-version : ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5 ']
15+ name : PHP ${{ matrix.php-version }} Test
1316 services :
1417 redis :
1518 image : redis
@@ -22,30 +25,30 @@ jobs:
2225 - 6379:6379
2326 steps :
2427 - name : Checkout Code
25- uses : actions/checkout@v3
28+ uses : actions/checkout@v4
2629
2730 - name : Install PHP
2831 uses : shivammathur/setup-php@v2
2932 with :
30- php-version : ${{ matrix.php-versions }}
31- extensions : :redis
33+ php-version : ${{ matrix.php-version }}
34+ extensions : pcntl, sysvshm, sysvsem, sysvmsg, redis
35+ coverage : ${{ matrix.php-version == '8.5' && 'xdebug' || 'none' }}
3236
33- - name : Install composer and dependencies
34- uses : php-actions/ composer@v6
37+ - name : Install dependencies
38+ run : composer install --no-interaction --prefer-dist
3539
36- - name : PHPUnit Tests
37- uses : php-actions/phpunit@v3
38- env :
39- XDEBUG_MODE : coverage
40- with :
41- bootstrap : vendor/autoload.php
42- configuration : phpunit.xml
43- php_extensions : xdebug sysvshm pcntl sysvsem sysvmsg redis
44- version : 9
45- args : tests --coverage-clover ./coverage.xml
40+ - name : Run tests (with coverage)
41+ if : matrix.php-version == '8.5'
42+ run : |
43+ XDEBUG_MODE=coverage vendor/bin/phpunit --configuration phpunit.xml --coverage-clover ./coverage.xml
44+
45+ - name : Run tests
46+ if : matrix.php-version != '8.5'
47+ run : vendor/bin/phpunit --configuration phpunit.xml
4648
4749 - name : Upload to Codecov
48- uses : codecov/codecov-action@v3
50+ if : matrix.php-version == '8.5'
51+ uses : codecov/codecov-action@v4
4952 env :
5053 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
5154 with :
0 commit comments