Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test cove pr comment #474

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
},
},
});
Loading