Skip to content

Add a typecheck and coverage-threshold gate job to .github/workflows/ci.yml beyond the current smoke check #692

Description

@Jagadeeshftw

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox open-source programMaybe RewardedGrantFox: potentially rewarded contributionOfficial Campaign | FWC26GrantFox official campaign issuebackendBackend / API worktestingTests and coverage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions