Skip to content

Commit

Permalink
Code coverage added in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
alimranahmed committed Jun 22, 2024
1 parent b95ae39 commit 15b90c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: pcov
ini-values: |
pcov.enabled=1
coverage: pcov

- name: Cache dependencies
uses: actions/cache@v1
Expand Down Expand Up @@ -72,5 +76,14 @@ jobs:
DB_USERNAME: root
DB_PASSWORD: password
run: |
vendor/bin/phpunit
vendor/bin/phpunit --coverage-clover tests/coverage/clover.xml
vendor/bin/pint
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/clover.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ _ide_helper.php
*.swp
*.swo
.phpunit.result.cache
/tests/coverage

0 comments on commit 15b90c0

Please sign in to comment.