Problem/Overview
The project has Mocha unit tests and c8 coverage tooling (npm run test:unit:coverage), but there is no Continuous Integration. Coverage is never enforced, so regressions in test coverage can land silently.
We want a GitHub Actions workflow that runs the unit test suite with coverage on every push to main and every pull request targeting main, and fails the build when code coverage drops below 85%. The workflow should also surface the coverage report so reviewers can inspect it.
Acceptance Criteria
Notes
- PRs for this issue must include a closing keyword in the PR body (e.g.
Closes #{number}); use Partially addresses #{number} for intermediate PRs and reserve Closes #{number} for the final PR so the issue auto-closes on merge.
- Assumptions (user skipped clarifications): gate all four c8 metrics at 85%; triggers = push to
main + PRs to main; scope = unit tests only; reporting = fail build + upload HTML artifact; single Node 20 LTS runner.
Problem/Overview
The project has Mocha unit tests and
c8coverage tooling (npm run test:unit:coverage), but there is no Continuous Integration. Coverage is never enforced, so regressions in test coverage can land silently.We want a GitHub Actions workflow that runs the unit test suite with coverage on every push to
mainand every pull request targetingmain, and fails the build when code coverage drops below 85%. The workflow should also surface the coverage report so reviewers can inspect it.Acceptance Criteria
.github/workflows/that runs on push tomainand on pull requests targetingmain.c8coverage on a Node 20 LTS runner.c8 --check-coverage: the job fails when lines, statements, functions, or branches coverage is below 85%.c8config file (.c8rc.json) so local and CI runs use the same gate.Notes
Closes #{number}); usePartially addresses #{number}for intermediate PRs and reserveCloses #{number}for the final PR so the issue auto-closes on merge.main+ PRs tomain; scope = unit tests only; reporting = fail build + upload HTML artifact; single Node 20 LTS runner.