From 44d628ddaf527ca0e0ea09c669f7782325989708 Mon Sep 17 00:00:00 2001 From: lifeparticle Date: Sun, 11 Aug 2024 09:46:24 +1000 Subject: [PATCH 1/2] update --- .github/workflows/ui-pr.yml | 11 +++++++++++ ui/vite.config.ts | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ui-pr.yml b/.github/workflows/ui-pr.yml index f4bb532f..43ca2338 100644 --- a/.github/workflows/ui-pr.yml +++ b/.github/workflows/ui-pr.yml @@ -30,6 +30,17 @@ jobs: - name: Run Tests run: yarn test + - name: "Test" + run: npx vitest --coverage.enabled true + + - name: "Report Coverage" + if: always() + uses: davelosert/vitest-coverage-report-action@v2 + with: + working-directory: ui + json-summary-path: html/ui/coverage-summary.json + json-final-path: html/ui/coverage-final.json + - name: Post the knip results run: yarn knip --max-issues=${{ vars.KNIP_MAX_ISSUES }} diff --git a/ui/vite.config.ts b/ui/vite.config.ts index ba268132..e6d1fe7d 100644 --- a/ui/vite.config.ts +++ b/ui/vite.config.ts @@ -46,8 +46,15 @@ export default defineConfig({ reportsDirectory: "html/ui", include: ["**/*.{ts,tsx}"], exclude: ["**/*.test.{ts,tsx}", "**/types.ts", "**/*.testkit.ts"], - reporter: ["text", ["html", { subdir: "coverage" }], "lcov"], + reporter: [ + "text", + ["html", { subdir: "coverage" }], + "lcov", + "json-summary", + "json", + ], provider: "v8", + reportOnFailure: true, }, }, }); From 7bfdcbaee56e919e5b8561b151d0ecbe0afc902c Mon Sep 17 00:00:00 2001 From: lifeparticle Date: Sun, 11 Aug 2024 09:52:47 +1000 Subject: [PATCH 2/2] update --- .github/workflows/ui-pr.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ui-pr.yml b/.github/workflows/ui-pr.yml index 43ca2338..3c5b01fc 100644 --- a/.github/workflows/ui-pr.yml +++ b/.github/workflows/ui-pr.yml @@ -28,9 +28,6 @@ jobs: run: yarn install --immutable - name: Run Tests - run: yarn test - - - name: "Test" run: npx vitest --coverage.enabled true - name: "Report Coverage"