Wire coverage reporting and minimum threshold in CI #50
Labels
No labels
blocked:gate-fetch
blocked:gate-implement
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:needs-local-checkout
blocked:no-changes
bug
feature-request
in-progress
needs-decompose
needs-triage
ops-task
quickfix
security/high
security/low
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/nodedesk#50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Wire code coverage reporting into nodedesk's CI pipeline, generate a coverage artifact on every run, and enforce a minimum coverage threshold so a regression that drops coverage below the configured floor fails the build.
Background
@vitest/coverage-v8is already installed (commit2f8684eonci/quality-gates-matrix/ PR #45).vitest.config.tshas nocoverageblock — noprovider, noreporter, nothresholds.package.jsonhas nocoveragescript..forgejo/workflows/ci.yml(PR #45, head2f8684e) has no coverage step — it runs lint, typecheck, unit, and build only.Acceptance criteria
vitest.config.tsdefines acoverageblock withprovider: 'v8',reporter: ['text', 'lcov', 'cobertura'], andinclude/excludepatterns that match the existing test config (excludestests/**,node_modules/**,.kilo/**,.venv/**).package.jsonaddstest:unit:coverage(andcoveragealias) runningvitest run --coverage..forgejo/workflows/ci.yml) gains a coverage step in theunitjob (Node 20 only — no need to run twice in the matrix): produces text + lcov + cobertura reports, uploads lcov artifact, and runsnpx vitest run --coverage --coverage.thresholds.lines=...with afail-underthreshold reflecting the baseline.main.Out of scope
Notes
ci/quality-gates-matrixbranch (PR #45) — do not open a new branch. This is a follow-up commit on the existing quality-gate PR.@vitest/coverage-v8^4.1.10 is already a devDependency.