Skip to content

Commit

Permalink
Fix code coverage under PHPUnit 10 (use pcov, phpdbg no longer suppor…
Browse files Browse the repository at this point in the history
…ted)
  • Loading branch information
scheb committed Nov 4, 2023
1 parent 51f8ec3 commit 5e6cfb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/actions/setup-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ inputs:
php-version:
description: 'PHP version to use'
required: true
php-coverage:
description: 'Code coverage tool for php'
required: false
default: 'none'
composer-token:
description: 'Github token for Composer'
required: true
Expand Down Expand Up @@ -33,7 +37,7 @@ runs:
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
coverage: 'none'
coverage: '${{ inputs.php-coverage }}'
php-version: '${{ inputs.php-version }}'
tools: php-cs-fixer
env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ jobs:
uses: ./.github/actions/setup-build
with:
php-version: '${{ matrix.php-version }}'
php-coverage: 'pcov'
composer-token: ${{ secrets.GITHUB_TOKEN }}

- name: 'Run tests with coverage'
run: phpdbg -qrr vendor/bin/phpunit --coverage-clover coverage/clover.xml
run: vendor/bin/phpunit --coverage-clover coverage/clover.xml

- name: 'Send Coverage to Codecov'
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit 5e6cfb1

Please sign in to comment.