Skip to content

Commit 0ce7d86

Browse files
Z Uservlv-code
authored andcommitted
ci: publish a test coverage report on every run
Adds npm run test:coverage (node:test experimental coverage via tsx) and a CI step so line/branch/function coverage is visible on every push and PR. The first report: 92% lines / 59% branches / 80% functions overall, with the dashboard view at 100% after the render regression tests; remaining gaps are the 3x-ui HTTP client (needs a live panel) and the GitHub releases proxy.
1 parent cc3c9a0 commit 0ce7d86

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ jobs:
2525
- name: Run test suite
2626
run: npm test
2727

28+
- name: Test coverage report
29+
run: npm run test:coverage
30+
2831
- name: Production bundle build
2932
run: npm run build

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"build": "esbuild server.ts --bundle --platform=node --format=cjs --packages=external --outfile=dist/server.cjs",
99
"start": "node dist/server.cjs",
1010
"lint": "tsc --noEmit",
11-
"test": "tsx --test test/*.test.ts"
11+
"test": "tsx --test test/*.test.ts",
12+
"test:coverage": "tsx --test --experimental-test-coverage test/*.test.ts"
1213
},
1314
"dependencies": {
1415
"@types/adm-zip": "^0.5.8",

0 commit comments

Comments
 (0)