Add test coverage reporting with Codecov#112
Conversation
Configure @vitest/coverage-v8 for sheets/cli/docs packages and lcov reporter for backend (Jest), and add CI steps to collect lcov reports and upload them to Codecov on every push/PR. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
📝 WalkthroughWalkthroughThis PR adds comprehensive code coverage collection and reporting across the project. It introduces Vitest/Jest coverage configurations, adds coverage tooling dependencies, updates CI workflows to collect coverage artifacts, and integrates Codecov for automated coverage uploads using secrets-based authentication. Changes
Sequence DiagramsequenceDiagram
participant CI as GitHub Actions (verify-self job)
participant Jest as Jest/Vitest
participant Coverage as Coverage Tools (v8)
participant LCOV as LCOV Reports
participant Codecov as Codecov Service
CI->>Jest: Run tests with coverage enabled
Jest->>Coverage: Instrument and collect coverage
Coverage->>LCOV: Generate lcov.info files
LCOV->>CI: Output coverage artifacts
CI->>Codecov: Upload lcov.info + flags + token
Codecov->>Codecov: Process and store coverage data
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Verification: verify:selfResult: ✅ PASS in 106.4s
Verification: verify:integrationResult: ✅ PASS |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/cli/package.json (1)
31-35:⚠️ Potential issue | 🟠 MajorPin
vitestto3.1.1to match@vitest/[email protected].
@vitest/[email protected]requiresvitestat version3.1.1(exact match), not a range. The currentvitest: ^3.1.0can resolve to3.1.0, causing peer dependency mismatch warnings. Keep both packages on the same version.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/package.json` around lines 31 - 35, The vitest dependency is declared as "vitest": "^3.1.0" which can resolve to 3.1.0 and conflict with `@vitest/coverage-v8`@3.1.1 that requires an exact [email protected]; change the vitest entry in package.json to "3.1.1" (pin exact version) so both "@vitest/coverage-v8" and "vitest" match 3.1.1 and eliminate the peer dependency mismatch.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@packages/cli/package.json`:
- Around line 31-35: The vitest dependency is declared as "vitest": "^3.1.0"
which can resolve to 3.1.0 and conflict with `@vitest/coverage-v8`@3.1.1 that
requires an exact [email protected]; change the vitest entry in package.json to
"3.1.1" (pin exact version) so both "@vitest/coverage-v8" and "vitest" match
3.1.1 and eliminate the peer dependency mismatch.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b3e5ce68-6e53-40d3-84af-3bdc4e7bd94b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
.github/workflows/ci.ymlpackages/backend/package.jsonpackages/cli/package.jsonpackages/cli/vitest.config.tspackages/docs/package.jsonpackages/docs/vite.config.tspackages/sheets/package.jsonpackages/sheets/vite.config.ts
Summary
Configure @vitest/coverage-v8 for sheets/cli/docs packages and lcov reporter for backend (Jest), and add CI steps to collect lcov reports and upload them to Codecov on every push/PR.
Why
Linked Issues
Fixes #
Verification
CI automatically posts a verification summary comment on this PR with
per-lane results for both
verify:selfandverify:integration.Skip reason (if applicable):
Risk Assessment
Notes for Reviewers
Summary by CodeRabbit