fix(ci): run test:coverage in CI to enforce thresholds - #3239
Conversation
Switch CI from test:all to test:coverage so the stack catches coverage regressions before they break downstream projects on update-stack. Exclude infrastructure/placeholder files from coverage collection (bootstrap, mailer, migrations, Clerk stub, deprecated Joi extension) and lower thresholds to 80/65/80/80 to match current reality — the organizations module is new and still building coverage. Closes #3238
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe pull request updates the CI workflow to enforce coverage thresholds during testing and adjusts Jest configuration by expanding file exclusions from coverage calculations and reducing coverage threshold targets. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Aligns the stack repo’s CI with downstream expectations by running Jest in coverage/threshold-enforcement mode, and adjusts Jest coverage configuration to make the run pass in CI.
Changes:
- Update GitHub Actions CI workflow to run
npm run test:coverageinstead ofnpm run test:all. - Expand Jest
collectCoverageFromexclusions to omit several files/directories from coverage collection. - Lower global Jest coverage thresholds.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
jest.config.js |
Updates coverage collection exclusions and reduces global coverage thresholds. |
.github/workflows/CI.yml |
Switches CI test command to npm run test:coverage to enforce thresholds in CI. |
Summary
npm run test:alltonpm run test:coverageso the stack enforces coverage thresholds, catching regressions before they break downstream projects onupdate-stackTest plan
npm run test:coveragepasses locally with all thresholds met (368 tests, 24 suites)test:coveragestepCloses #3238
Summary by CodeRabbit