File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed
Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -11,23 +11,31 @@ permissions:
1111
1212jobs :
1313 build :
14-
1514 runs-on : ubuntu-latest
15+ strategy :
16+ matrix :
17+ php-versions : ['8.1', '8.2', '8.3', '8.4']
18+ fail-fast : false
19+
20+ name : PHP ${{ matrix.php-versions }} Test
1621
1722 steps :
18- - uses : actions/checkout@v3
23+ - uses : actions/checkout@v4
1924
20- - name : Setup PHP with PECL extension
25+ - name : Setup PHP
2126 uses : shivammathur/setup-php@v2
2227 with :
23- php-version : ' 8.3'
28+ php-version : ${{ matrix.php-versions }}
29+ tools : composer:v2
30+ coverage : xdebug
31+ continue-on-error : ${{ matrix.php-versions == '8.4' }}
2432
2533 - name : Validate composer.json and composer.lock
2634 run : composer validate --strict
2735
2836 - name : Cache Composer packages
2937 id : composer-cache
30- uses : actions/cache@v3
38+ uses : actions/cache@v4
3139 with :
3240 path : vendor
3341 key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
3846 run : composer install --no-interaction --prefer-dist --no-progress
3947
4048 - name : Run test suite
41- run : composer run-script test
49+ run : vendor/bin/phpunit --coverage-clover=coverage.xml --log-junit junit.xml
50+
51+ - name : Upload coverage reports
52+ uses : codecov/codecov-action@v4
53+ if : ${{ matrix.php-versions == '8.3' }}
54+ with :
55+ token : ${{ secrets.CODECOV_TOKEN }}
56+ files : ./coverage.xml
You can’t perform that action at this time.
0 commit comments