Skip to content

non-production: set up codecov in this repo#129

Merged
dep merged 2 commits into
masterfrom
codeCovSetup
Jul 21, 2026
Merged

non-production: set up codecov in this repo#129
dep merged 2 commits into
masterfrom
codeCovSetup

Conversation

@dep

@dep dep commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pass secrets: inherit to the shared ruby-test-matrix workflow call in .github/workflows/pipeline.yml so the org CODECOV_TOKEN reaches the Codecov upload step
  • Add simplecov and simplecov-lcov as dev dependencies (Gemfile, per this repo's convention) and a spec/simplecov_helper.rb loaded first by spec/spec_helper.rb; on CI (GITHUB_ACTIONS) it emits lcov to coverage/lcov.info, locally it emits the HTML report
  • Ignore coverage/ in .gitignore; Gemfile.lock updated

Coverage

Measured locally with Ruby 3.1.2: 157 examples, 0 failures, Line Coverage: 93.54% (449/480). Verified GITHUB_ACTIONS=true run produces coverage/lcov.info.

No codecov.yml added since coverage is above 80%.

- Pass secrets: inherit to the shared ruby-test-matrix workflow so CODECOV_TOKEN reaches the Codecov upload step
- Add simplecov and simplecov-lcov, emitting coverage/lcov.info on CI
@dep
dep marked this pull request as ready for review July 14, 2026 13:58
@dep
dep requested a review from a team as a code owner July 14, 2026 13:58
@dep
dep requested review from Copilot and ishakun July 14, 2026 13:58

Copilot AI 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.

Pull request overview

Sets up test coverage reporting for this Ruby/RSpec repo so CI can upload an LCOV report to Codecov via the shared ruby-test-matrix reusable workflow.

Changes:

  • Adds SimpleCov initialization to RSpec via a new spec/simplecov_helper.rb (LCOV on GitHub Actions, HTML locally).
  • Adds simplecov / simplecov-lcov dependencies (Gemfile + appraisal gemfiles) and updates Gemfile.lock.
  • Updates CI workflow to pass secrets to the reusable workflow and ignores coverage/ in git.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
spec/spec_helper.rb Loads SimpleCov helper before requiring RSpec/app code.
spec/simplecov_helper.rb Configures SimpleCov output (LCOV on CI, HTML locally).
Gemfile Adds SimpleCov gems to dev dependencies.
Gemfile.lock Locks SimpleCov-related dependencies.
gemfiles/rails_7_0.gemfile Adds SimpleCov gems for the Rails 7.0 appraisal.
gemfiles/rails_7_1.gemfile Adds SimpleCov gems for the Rails 7.1 appraisal.
gemfiles/rails_7_2.gemfile Adds SimpleCov gems for the Rails 7.2 appraisal.
gemfiles/rails_8_0.gemfile Adds SimpleCov gems for the Rails 8.0 appraisal.
.gitignore Ignores generated coverage artifacts.
.github/workflows/pipeline.yml Passes secrets into the reusable CI workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pipeline.yml
Comment thread Gemfile
Comment thread gemfiles/rails_7_2.gemfile
Comment thread gemfiles/rails_7_1.gemfile
Comment thread gemfiles/rails_7_0.gemfile
Comment thread gemfiles/rails_8_0.gemfile
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@dep
dep merged commit 2b0c752 into master Jul 21, 2026
29 checks passed
@dep
dep deleted the codeCovSetup branch July 21, 2026 19:39
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.

3 participants