From e142c9dd5f09e824705d53d0685c404d630b1e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recep=20=C5=9Een?= Date: Wed, 27 May 2026 08:42:54 +0300 Subject: [PATCH] feat(ci): add Codecov Test Analytics - Add junit reporter to vitest config - Upload JUnit XML via codecov/test-results-action@v1 on all Node versions - Enables flaky test detection and test run time tracking on Codecov Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 7 +++++++ vitest.config.ts | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6afbc47..0e2cbf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,5 +52,12 @@ jobs: files: coverage/cobertura-coverage.xml fail_ci_if_error: true + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: test-report.junit.xml + - name: Lint (Biome) run: npm run check diff --git a/vitest.config.ts b/vitest.config.ts index be009b5..1a07ad2 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,6 +4,10 @@ export default defineConfig({ test: { globals: true, environment: 'node', + reporters: ['default', 'junit'], + outputFile: { + junit: 'test-report.junit.xml', + }, coverage: { provider: 'v8', reporter: ['text', 'json', 'html', 'cobertura'],