Skip to content

ci: add code coverage tracking with SimpleCov and Codecov - #40

Open
Amayyas wants to merge 1 commit into
mainfrom
ci/coverage-tracking
Open

ci: add code coverage tracking with SimpleCov and Codecov#40
Amayyas wants to merge 1 commit into
mainfrom
ci/coverage-tracking

Conversation

@Amayyas

@Amayyas Amayyas commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • SimpleCov wired into spec_helper.rb, with HTML (local) + Cobertura XML (Codecov — it doesn't understand SimpleCov's native .resultset.json) formatters
  • minimum_coverage 80 — matches the actual measured baseline (85.06%) with headroom, not a made-up number. client.rb is the main gap (~44%) since every spec mocks it entirely; tracked as No HTTP-contract-level test for Client's request shape #9
  • CI uploads to Codecov via OIDC, no CODECOV_TOKEN secret to manage (same pattern as the RubyGems trusted publishing already in this repo), non-blocking on upload failure
  • coverage/ gitignored, badge added to README

Closes #23

Heads up

The Codecov badge won't show real numbers until the repo is activated on codecov.io (sign in with GitHub — should auto-detect since the repo is public). The workflow itself doesn't depend on that to stay green.

Test plan

  • bundle exec rspec — 34/34 passing, coverage report generates (HTML + XML) locally
  • Verified actual coverage numbers before setting the threshold, not guessed
  • gem build chorus-llm.gemspec — builds cleanly
  • CI green
  • Codecov upload step runs without hard-failing the job

- SimpleCov wired into spec_helper.rb (must start before `require
  "chorus"`), with a MultiFormatter: HTML for local browsing
  (coverage/index.html), Cobertura XML for Codecov — Codecov's
  uploader doesn't understand SimpleCov's native .resultset.json
  format directly.
- minimum_coverage set to 80%, matching the actual measured baseline
  (85.06%) with a little headroom, not an arbitrary target. client.rb
  is the main gap (~44%) since every existing spec mocks Client
  entirely — tracked separately as issue #9.
- CI uploads coverage/coverage.xml to Codecov via OIDC (no
  CODECOV_TOKEN secret to manage, consistent with how RubyGems
  publishing already works in this repo), non-blocking on upload
  failure.
- coverage/ gitignored.
- Codecov badge added to README.

Closes #23

Note: the Codecov badge/dashboard won't show real data until the repo
is activated on codecov.io (sign in with GitHub, the repo should show
up automatically since it's public) — the workflow itself doesn't
require that to keep passing, since fail_ci_if_error defaults to false.
@Amayyas Amayyas self-assigned this Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Amayyas, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f2c34028-2bc1-44c4-98f2-98ea743cb21f

📥 Commits

Reviewing files that changed from the base of the PR and between f96ba33 and b69b7e9.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • .gitignore
  • Gemfile
  • README.md
  • spec/spec_helper.rb

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.

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.

Add code coverage tracking (SimpleCov + Codecov)

1 participant