diff --git a/.github/workflows/php-cs-stan-unit.yml b/.github/workflows/php-cs-stan-unit.yml index 7968ba6..e36ec33 100644 --- a/.github/workflows/php-cs-stan-unit.yml +++ b/.github/workflows/php-cs-stan-unit.yml @@ -153,8 +153,14 @@ jobs: - name: 'Dump Composer autoloader' run: 'composer dump-autoload --classmap-authoritative --no-cache' - - name: 'Run PHPUnit with coverage' - run: 'vendor/bin/phpunit --coverage-clover=${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml' + - name: 'Run PHPUnit with coverage and JUnit report' + run: 'vendor/bin/phpunit --coverage-clover=${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml --log-junit ${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml' + + - name: Upload test results to Codecov + uses: codecov/test-results-action@v1 + with: + files: './${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml' + token: ${{ secrets.CODECOV_TOKEN }} - name: Check test coverage id: test-coverage diff --git a/.github/workflows/php-unit.yml b/.github/workflows/php-unit.yml index c63455a..2333543 100644 --- a/.github/workflows/php-unit.yml +++ b/.github/workflows/php-unit.yml @@ -91,8 +91,14 @@ jobs: - name: 'Dump Composer autoloader' run: 'composer dump-autoload --classmap-authoritative --no-cache' - - name: 'Run PHPUnit with coverage' - run: 'vendor/bin/phpunit --coverage-clover=${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml' + - name: 'Run PHPUnit with coverage and JUnit report' + run: 'vendor/bin/phpunit --coverage-clover=${{ matrix.php-version }}-${{ strategy.job-index }}-clover.xml --log-junit ${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml' + + - name: Upload test results to Codecov + uses: codecov/test-results-action@v1 + with: + files: './${{ matrix.php-version }}-${{ strategy.job-index }}-junit.xml' + token: ${{ secrets.CODECOV_TOKEN }} - name: Check test coverage id: test-coverage