2727 matrix :
2828 os : [ macos-latest, ubuntu-latest, windows-latest ]
2929 php-version : [ '7.4', '8.1' ]
30- install-fixer-from-master-branch : [false]
30+ coverage-driver : [ none ]
31+ install-fixer-from-master-branch : [ false ]
3132 include :
3233 - os : ubuntu-latest
3334 php-version : ' 7.2'
3940 php-version : ' 7.3'
4041 - os : ubuntu-latest
4142 php-version : ' 8.0'
43+ - os : ubuntu-latest
44+ php-version : ' 8.1'
45+ coverage-driver : pcov
46+ description : ' with calculating code coverage'
4247 - os : ubuntu-latest
4348 php-version : ' 8.1'
4449 install-fixer-from-master-branch : true
@@ -52,16 +57,11 @@ jobs:
5257 PHP_CS_FIXER_FUTURE_MODE : 1
5358 steps :
5459 - uses : actions/checkout@v2
55- - uses : actions/github-script@v5
56- id : coverage-driver
57- with :
58- script : ' return "${{ matrix.os }}" == "ubuntu-latest" && "${{ matrix.php-version }}" == "8.1" ? "pcov" : "none"'
59- result-encoding : string
6060 - uses : shivammathur/setup-php@v2
6161 with :
6262 php-version : ${{ matrix.php-version }}
6363 ini-values : pcov.directory=$GITHUB_WORKSPACE, zend.assertions=1
64- coverage : ${{ steps .coverage-driver.outputs.result }}
64+ coverage : ${{ matrix .coverage-driver }}
6565 - id : composer-cache
6666 run : echo "::set-output name=dir::$(composer config cache-files-dir)"
6767 - uses : actions/cache@v2
@@ -72,11 +72,11 @@ jobs:
7272 run : composer require friendsofphp/php-cs-fixer:dev-master --no-update
7373 - run : composer update --no-progress ${{ matrix.composer_flags }}
7474 - run : composer test -- --coverage-clover=./build/logs/clover.xml
75- - if : steps .coverage-driver.outputs.result != 'none '
75+ - if : matrix .coverage-driver == 'pcov '
7676 env :
7777 COVERALLS_REPO_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7878 run : composer require --dev php-coveralls/php-coveralls --quiet --with-all-dependencies && ./vendor/bin/php-coveralls --verbose
79- - if : steps .coverage-driver.outputs.result != 'none '
79+ - if : matrix .coverage-driver == 'pcov '
8080 env :
8181 STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
8282 run : composer infection
0 commit comments