Skip to content

Commit f5105e4

Browse files
authored
Fix coverage (#730)
1 parent a2b4c11 commit f5105e4

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
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'
@@ -39,6 +40,10 @@ jobs:
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

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
failOnRisky='true'
1111
failOnWarning='true'
1212
forceCoversAnnotation='true'
13+
verbose='true'
1314
>
1415

1516
<php>

0 commit comments

Comments
 (0)