Skip to content

Commit

Permalink
ci: codecov test results (#2367)
Browse files Browse the repository at this point in the history
Add `codecov/test-results-action` action to ci
  • Loading branch information
DjordyKoert authored Oct 24, 2024
1 parent c845c0f commit 4cc45e8
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,25 @@ jobs:
composer-flags: ${{ matrix.composer-flags }}

- name: PHPUnit Tests
run: vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-clover=coverage-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.doctrine-annotations }}${{ matrix.composer-flags }}.xml --coverage-filter=src/
run: |
vendor/bin/phpunit \
--configuration phpunit.xml.dist \
--log-junit=junit-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.doctrine-annotations }}${{ matrix.composer-flags }}.xml \
--coverage-clover=coverage-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.doctrine-annotations }}${{ matrix.composer-flags }}.xml \
--coverage-filter=src/
- uses: actions/upload-artifact@v4
if: ${{ matrix.php-version != '7.4' }}
with:
name: coverage-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.doctrine-annotations }}${{ matrix.composer-flags }}
path: coverage*.xml
name: phpunit-${{ matrix.php-version }}-${{ matrix.symfony-require }}-${{ matrix.doctrine-annotations }}${{ matrix.composer-flags }}
path: |
coverage*.xml
junit*.xml
if-no-files-found: error
retention-days: 2

upload-to-codecov:
name: Upload Code Coverage
codecov:
name: Codecov
runs-on: ubuntu-22.04

needs: phpunit
Expand All @@ -106,7 +113,13 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v4

- uses: codecov/codecov-action@v4
- name: Upload test results to Codecov.io
uses: codecov/test-results-action@v1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Upload code coverage to Codecov.io
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
env:
Expand Down

0 comments on commit 4cc45e8

Please sign in to comment.