Skip to content

Commit

Permalink
+ Upload coverage to Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmondDantes committed Oct 27, 2024
1 parent bb221fe commit 297a5a0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: xdebug

- name: Check PHP version
run: php -v
Expand All @@ -44,4 +45,16 @@ jobs:
run: composer run-script analysis

- name: Run test suite
run: composer run-script test
run: |
mkdir -p coverage
composer run-script test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/clover.xml
flags: unittests
name: code-coverage-report
fail_ci_if_error: true
verbose: true
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"phpstan/phpstan": "^1.12"
},
"scripts": {
"test": "vendor/bin/phpunit ./tests",
"test": "vendor/bin/phpunit --coverage-clover=coverage/clover.xml ./tests",
"analysis": "phpstan"
}
}

0 comments on commit 297a5a0

Please sign in to comment.