Skip to content

Commit ffb8e7e

Browse files
committed
Add unit test coverage reporting
1 parent 6afd7ab commit ffb8e7e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/actions/test/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ runs:
77
- name: Run tests
88
run: pnpm test
99
shell: bash
10+
11+
- name: Report test coverage
12+
if: always()
13+
uses: davelosert/vitest-coverage-report-action@v2

packages/tests-unit/vitest.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export default defineConfig({
1717
"**/dist/**",
1818
"**/coverage/**",
1919
],
20+
reporter: ["text", "html", "json", "json-summary"],
21+
reportOnFailure: true,
2022
},
2123
root: "../../",
2224
include: ["packages/tests-unit/**/*.{test,spec}.?(c|m)ts"],

0 commit comments

Comments
 (0)