1- name : PHPUnit
1+ name : " Continuous Integration "
22
33on :
44 push :
5- branches : [ main ]
5+ paths-ignore :
6+ - ' doc/**'
67 pull_request :
7- branches : [ main ]
8+ paths-ignore :
9+ - ' doc/**'
810
911jobs :
10- test :
11- name : PHP ${{ matrix.php_version }}
12+ tests :
13+ name : PHP ${{ matrix.php-version }}
14+
1215 runs-on : ubuntu-latest
1316 continue-on-error : ${{ matrix.experimental }}
17+
1418 strategy :
1519 fail-fast : false
1620 matrix :
17- php_version : ['7.4', '8.0', '8.1']
18- composer_flags : ['--ignore-platform-reqs', '']
21+ php-version :
22+ - " 7.4"
23+ - " 8.0"
1924 experimental : [false]
2025 include :
21- - php_version : ' 8.1'
26+ - php-version : " 8.1"
2227 experimental : true
2328
2429 steps :
2732 - name : Setup PHP with PECL extension
2833 uses : shivammathur/setup-php@2.12.0
2934 with :
30- php-version : ${{ matrix.php_version }}
35+ php-version : ${{ matrix.php-version }}
3136 tools : composer:v2
3237 coverage : pcov
3338
@@ -42,12 +47,21 @@ jobs:
4247 uses : actions/cache@v2.1.6
4348 with :
4449 path : ${{ steps.composer-cache.outputs.dir }}
45- key : ${{ runner.os }}-php-${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}
46- restore-keys : ${{ runner.os }}-php-${{ matrix.php_version }}-
50+ key : ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
51+ restore-keys : ${{ runner.os }}-php-${{ matrix.php-version }}-
4752
4853 - name : Install dependencies
4954 if : steps.composer-cache.outputs.cache-hit != 'true'
50- run : composer install ${{ matrix.composer_flags }} --prefer-dist --no-progress --optimize-autoloader --no-interaction
55+ run : composer install --prefer-dist --no-progress --optimize-autoloader --no-interaction
5156
5257 - name : Run PHPUnit test suite
53- run : composer run-script phpunit
58+ run : composer run-script test-ci
59+
60+ - name : Publish code coverage
61+ uses : paambaati/codeclimate-action@v2.7.5
62+ env :
63+ CC_TEST_REPORTER_ID : ${{ secrets.CC_TEST_REPORTER_ID }}
64+ with :
65+ coverageCommand : composer run-script test-coverage
66+ coverageLocations : |
67+ ${{github.workspace}}/clover.xml:clover
0 commit comments