Skip to content

Add test coverage reporting with Codecov#112

Merged
hackerwins merged 1 commit into
mainfrom
add-codecov
Apr 9, 2026
Merged

Add test coverage reporting with Codecov#112
hackerwins merged 1 commit into
mainfrom
add-codecov

Conversation

@ggyuchive

@ggyuchive ggyuchive commented Apr 9, 2026

Copy link
Copy Markdown
Member

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:self and verify:integration.

  • verify:self — CI comment shows ✅
  • verify:integration — CI comment shows ✅ (or explicit skip reason below)

Skip reason (if applicable):

Risk Assessment

  • User-facing risk:
  • Data/security risk:
  • Rollback plan:

Notes for Reviewers

  • UI changes (screenshots/gifs if applicable):
  • Follow-up work (if any):

Summary by CodeRabbit

  • Chores
    • Configured test coverage collection and reporting across all packages
    • Integrated code coverage metrics into the continuous integration pipeline for improved quality assurance

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]>
@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
CI/Codecov Integration
.github/workflows/ci.yml
Adds coverage collection steps for four packages (@wafflebase/sheets, @wafflebase/cli, @wafflebase/docs, @wafflebase/backend) and introduces Codecov upload using codecov/codecov-action@v4 with per-package flags and token authentication.
Coverage Dependencies
packages/cli/package.json, packages/docs/package.json, packages/sheets/package.json
Adds @vitest/[email protected] as a new devDependency to each package to enable coverage instrumentation and reporting.
Test Coverage Configuration
packages/backend/package.json, packages/cli/vitest.config.ts, packages/docs/vite.config.ts, packages/sheets/vite.config.ts
Configures coverage collection with v8 provider, enables both text and lcov reporters, and scopes collection to relevant source files. Sheets config excludes ANTLR generated files.

Sequence Diagram

sequenceDiagram
    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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hops through the codebase with glee,
Measuring coverage systematically,
V8 tools and LCOV reports flow,
To Codecov's platform they go,
Quality metrics shine bright as can be!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding test coverage reporting integration with Codecov. All file modifications across multiple packages support this objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-codecov

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Verification: verify:self

Result: ✅ PASS in 106.4s

Lane Status Duration
sheets:build ✅ pass 12.5s
docs:build ✅ pass 6.4s
verify:fast ✅ pass 52.9s
frontend:build ✅ pass 13.8s
verify:frontend:chunks ✅ pass 0.3s
backend:build ✅ pass 4.1s
cli:build ✅ pass 1.7s
verify:entropy ✅ pass 14.7s

Verification: verify:integration

Result: ✅ PASS

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟠 Major

Pin vitest to 3.1.1 to match @vitest/[email protected].

@vitest/[email protected] requires vitest at version 3.1.1 (exact match), not a range. The current vitest: ^3.1.0 can resolve to 3.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

📥 Commits

Reviewing files that changed from the base of the PR and between e44ee15 and 2cb73b3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • packages/backend/package.json
  • packages/cli/package.json
  • packages/cli/vitest.config.ts
  • packages/docs/package.json
  • packages/docs/vite.config.ts
  • packages/sheets/package.json
  • packages/sheets/vite.config.ts

@hackerwins
hackerwins merged commit 5f2ea04 into main Apr 9, 2026
3 checks passed
@hackerwins
hackerwins deleted the add-codecov branch April 9, 2026 21:36
@hackerwins hackerwins mentioned this pull request Apr 11, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants