diff --git a/.github/workflows/unit-ci.yml b/.github/workflows/unit-ci.yml index 506ec9a..a1e6455 100644 --- a/.github/workflows/unit-ci.yml +++ b/.github/workflows/unit-ci.yml @@ -30,8 +30,16 @@ jobs: - name: Install dependencies run: npm ci - - name: Install test dependencies (Playwright Chromium) - run: npm run test:install-dependencies + # unit tests do not require Playwright, so we can skip installing its dependencies to save time + # - name: Install test dependencies (Playwright Chromium) + # run: npm run test:install-dependencies - - name: Run unit tests suite - run: npm run test:unit \ No newline at end of file + - name: Run unit tests suite with coverage + run: npm run test:unit:coverage + + - name: Upload coverage report + if: always() + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: coverage/** \ No newline at end of file diff --git a/vitest.config.unit.ts b/vitest.config.unit.ts index 6fbbaa5..90d44dd 100644 --- a/vitest.config.unit.ts +++ b/vitest.config.unit.ts @@ -26,7 +26,7 @@ export default mergeConfig( ...importOnlyFiles, ], provider: "v8", - reporter: ["text", "json", "html"], + reporter: ["text", "json", "html", ["text", { file: "coverage-text.txt" }]], }, }, })