Skip to content

Commit

Permalink
Merge pull request #474 from lifeparticle/add-test-cov-pr-comment
Browse files Browse the repository at this point in the history
Add test cove pr comment
  • Loading branch information
lifeparticle authored Aug 10, 2024
2 parents d6e8f1d + 7bfdcba commit 28a6ec2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ui-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ jobs:
run: yarn install --immutable

- name: Run Tests
run: yarn 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 }}
Expand Down
9 changes: 8 additions & 1 deletion ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
});

0 comments on commit 28a6ec2

Please sign in to comment.