Repository navigation
ci: add test-shared job + honest shared coverage gate - #1293
Conversation
packages/shared tests ran nowhere in CI: ci.yml tested only backend/bot/frontend, and the reusable Quality Gates workflow runs no jest. The 89/89/90/89 coverageThreshold was enforced by nothing — and actual coverage is 47.08/41.83/38.82/46.76 (generated code and barrels already excluded), so wiring the job with the old gate would be permanently red. - ci.yml: add test-shared job (mirrors test-backend; downloads the shared-build artifact for the generated Prisma client; dummy DATABASE_URL for import-time Prisma init, per #1249 precedent) and wire it into the quality-gate needs + assertion. - jest.config.cjs: honest gate at 46/41/38/46, just below measured, per the #1076 pattern; ratchet upward as coverage improves. Verified locally: jest --ci --coverage exits 0 (733/733 pass, gate satisfied); actionlint clean. Closes #1277
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Warning Review limit reached
More reviews will be available in 53 minutes and 39 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Failed to generate code suggestions for PR |
|



What
Adds the missing
test-sharedCI job and makes the shared coverage gate honest. Closes #1277.Why
packages/sharedtests ran nowhere in CI: ci.yml tests only backend/bot/frontend, and the reusable Quality Gates workflow runs SAST/lint/knip — no jest. Cost of the gap is documented history: three "passes CI, breaks prod" incidents were shared-package issues, and #1262's failing tests sat invisible until this session's test sweep.Changes
test-sharedjob mirroringtest-backend(needsbuild-shared, downloads the shared-build artifact for the generated Prisma client, dummyDATABASE_URLfor import-time Prisma init per the harden verify-shared-exports.mjs to cover all @lucky/shared subpaths (not just services/*) #1249 precedent). Wired intoquality-gateneeds + assertion so it blocks merge like the other suites.Verification
npm run test --workspace=packages/shared -- --ci --coverage→ exit 0, 733/733 pass, gate satisfiedactionlintclean on the workflowSequencing
Built on top of #1292 (env-test isolation fix) — without it the new job would fail on the first run.
Summary by cubic
Adds a
test-sharedCI job and makes the shared coverage gate enforceable sopackages/sharedtests run in CI and block merges when failing. Closes #1277.New Features
test-sharedjob that mirrors backend tests, downloads theshared-buildartifact, setsDATABASE_URLfor Prisma init, and is included in Quality Gates.Bug Fixes
packages/sharedat 46/41/38/46 to match current coverage and prevent perma-red, with room to ratchet up over time.Written for commit 1ad8696. Summary will update on new commits.