Commit 3034377
authored
ci: add code coverage with 80% line threshold (#63)
* ci: add code coverage with 80% line threshold
Add test:coverage npm script using Node.js built-in test coverage
with --test-coverage-lines=80 threshold. Excludes thin VS Code API
wrapper files (extension.ts, statusBar.ts, configureMcp.ts,
setupWorkspace.ts, showStatus.ts) that are tested by integration
tests rather than unit tests.
Add coverage check step to CI workflow (Linux-only in unit-test job).
Include coverage in the npm run check gate.
Current coverage: 82.65% line, 86.27% branch, 86.69% function.
Closes #61
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
* fix: exclude patchloomCli.test.js from coverage
The patchloomCli tests depend on the patchloom binary being on PATH.
In CI on Ubuntu, the binary is not available so tests skip, causing
the test file's coverage to drop from 88% to 17% and failing the
80% threshold. Exclude this environment-dependent test file from
coverage measurement.
Also add --test-coverage-include to limit coverage to source files
only (not test files) for cleaner measurement.
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
---------
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>1 parent db0086f commit 3034377
3 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | | - | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
0 commit comments