diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4bb7a69..7de8667 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -86,12 +86,18 @@ jobs: run: pnpm test -- --coverage.enabled env: GOOGLE_SAFE_BROWSING_API_KEY: ${{ secrets.GOOGLE_SAFE_BROWSING_API_KEY }} - - name: Update coverage report - uses: codacy/codacy-coverage-reporter-action@a38818475bb21847788496e9f0fddaa4e84955ba + TEST_ANALYTICS: 1 + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a if: ${{ github.actor != 'renovate[bot]' }} with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: coverage/clover.xml + token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload test results to Codecov + if: ${{ github.actor != 'renovate[bot]' && !cancelled() }} + uses: codecov/test-results-action@9739113ad922ea0a9abb4b2c0f8bf6a4aa8ef820 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: 'coverage/junit.xml' deno: name: Deno needs: lints diff --git a/vitest.config.ts b/vitest.config.ts index 4e6f2c1..0495fcd 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -17,7 +17,10 @@ export default defineConfig({ reporter: process.env.CI ? ['clover'] : coverageConfigDefaults.reporter, }, reporters: process.env.CI - ? ['dot', 'github-actions'] + ? process.env.TEST_ANALYTICS + ? ['junit', 'dot', 'github-actions'] + : ['dot', 'github-actions'] : configDefaults.reporters, + outputFile: 'coverage/junit.xml', }, })