Description
.github/workflows/ci.yml currently runs a single step that echoes "CI temporarily scoped to smoke check while build/test failures are triaged" and nothing else — no tsc, no vitest, no coverage check runs on pull requests today. Add a dedicated job that runs tsc --noEmit for type-checking and vitest run --coverage with an enforced minimum coverage threshold, so a PR that breaks the type-check or drops coverage fails visibly instead of silently merging.
Requirements and context
- Add a
typecheck job step running pnpm exec tsc --noEmit (or pnpm build if that is preferred as the type-check signal) against tsconfig.json
- Add a
coverage job step running pnpm test:coverage and configure vitest.config.ts coverage thresholds (lines/branches/functions) so the job fails the build when coverage regresses below the threshold
- Keep the existing smoke-check step or clearly document why it is superseded, and note in the PR description what currently-failing build/test issues (if any) needed to be fixed to turn this on
- Must be secure, tested, and documented
- Should be efficient and easy to review
Suggested execution
Fork the repo and create a branch
git checkout -b feature/ci-typecheck-coverage-gate
Implement changes
- Update/Write:
.github/workflows/ci.yml
- Update/Write:
vitest.config.ts
- Add/Update tests:
src/index.test.ts
- Add documentation:
README.md
- Include clear code comments and TS types
- Validate security assumptions
Test and commit
- Run tests:
pnpm test
- Cover edge cases
- Include test output and security notes
Example commit message
feat: add typecheck and coverage gate to CI
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
.github/workflows/ci.ymlcurrently runs a single step that echoes "CI temporarily scoped to smoke check while build/test failures are triaged" and nothing else — notsc, novitest, no coverage check runs on pull requests today. Add a dedicated job that runstsc --noEmitfor type-checking andvitest run --coveragewith an enforced minimum coverage threshold, so a PR that breaks the type-check or drops coverage fails visibly instead of silently merging.Requirements and context
typecheckjob step runningpnpm exec tsc --noEmit(orpnpm buildif that is preferred as the type-check signal) againsttsconfig.jsoncoveragejob step runningpnpm test:coverageand configurevitest.config.tscoverage thresholds (lines/branches/functions) so the job fails the build when coverage regresses below the thresholdSuggested execution
Fork the repo and create a branch
Implement changes
.github/workflows/ci.ymlvitest.config.tssrc/index.test.tsREADME.mdTest and commit
pnpm testExample commit message
Guidelines