Commit 02a572e
authored
feat: add test coverage reporting with GitHub Pages deployment (#188)
* feat(ci): add test coverage reporting with GitHub Pages deployment
Add coverage script to package.json and update CI workflow to:
- Run CI on all pushes (not just main branch)
- Execute tests with coverage on main branch only
- Upload coverage reports to GitHub Pages for main branch
- Run regular tests without coverage on other branches/PRs
This addresses the need for visibility into test coverage metrics
while keeping PR builds fast by only generating coverage on main.
Closes #184
* chore(deps): upgrade vitest to v4.0.15
Update vitest and @vitest/coverage-v8 from v3.2.4 to v4.0.15.
Vitest v4 introduces several improvements including:
- Stable browser mode
- Visual regression testing support
- Rewritten pool architecture without Tinypool
- Workspace renamed to projects configuration
This upgrade prepares the codebase for using v4's projects feature
for monorepo test aggregation.
Closes #186
* feat(test): configure vitest projects for monorepo coverage
Refactor vitest configuration to use v4's projects feature for
unified monorepo test execution and coverage reporting.
Changes:
- Add projects configuration with 'root' and 'examples' workspaces
- Simplify package.json test scripts (remove test:submodules, test:root)
- Extend coverage.include to capture examples/**/*.ts files
- Enable automatic test discovery in examples when tests are added
This allows running all tests across the monorepo with a single
'pnpm test' command and generates unified coverage reports that
include both src and examples directories.
* chore: update actionss
* feat(ci): add coverage badge generation
Add automatic coverage badge SVG generation using
jaywcjlove/coverage-badges-cli action.
Changes:
- Add json-summary reporter to vitest coverage config
- Generate badges.svg from coverage-summary.json in CI
- Badge will be available at GitHub Pages URL/badges.svg
This enables adding a coverage badge to README that automatically
updates when coverage changes.
* chore(ci): update actions
Update coverage-badges-cli action reference to v2.2.0 with correct SHA.1 parent c53c441 commit 02a572e
File tree
5 files changed
+154
-353
lines changed- .github/workflows
5 files changed
+154
-353
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| 41 | + | |
35 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 30 | + | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
0 commit comments