Skip to content

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

Merged
dep merged 1 commit into
masterfrom
codeCovSetup
Jul 21, 2026
Merged

non-production: set up codecov in this repo#151
dep merged 1 commit into
masterfrom
codeCovSetup

Conversation

@dep

@dep dep commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

non-production: set up codecov in this repo

  • Issue Link:

Summary of Changes

  • Pass secrets: inherit to the shared ruby-test-matrix workflow so CODECOV_TOKEN reaches the Codecov upload step.
  • Moved the existing inline SimpleCov config from spec/spec_helper.rb into spec/simplecov_helper.rb, required as the first line of spec_helper.rb so coverage starts before the gem's code is loaded (previously SimpleCov started after require 'process_settings', under-reporting coverage).
  • On CI (GITHUB_ACTIONS), emits lcov to coverage/lcov.info via simplecov-lcov; locally uses the HTML formatter.
  • simplecov / simplecov-lcov were already in the Gemfile and Gemfile.lock; no dependency changes needed.

Measured local coverage: 94.82% line coverage (227 examples, 0 failures).

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

@dep
dep marked this pull request as ready for review July 14, 2026 13:57
@dep
dep requested a review from a team as a code owner July 14, 2026 13:57
@dep
dep requested review from Copilot and ttstarck July 14, 2026 13:57

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 Codecov coverage reporting for this Ruby repo by ensuring coverage collection starts before the library is loaded and by allowing the CI workflow to pass the Codecov token into the shared test-matrix workflow.

Changes:

  • Load SimpleCov configuration via spec/simplecov_helper.rb as the first line of spec/spec_helper.rb so coverage starts before require 'process_settings'.
  • Emit LCOV (coverage/lcov.info) on GitHub Actions via simplecov-lcov, while keeping HTML coverage locally.
  • Update the pipeline workflow to pass secrets into the reusable workflow call for Codecov upload.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
spec/spec_helper.rb Requires the new SimpleCov helper before loading the gem to avoid under-reporting coverage.
spec/simplecov_helper.rb Centralizes SimpleCov config and switches formatters based on CI vs local runs.
.github/workflows/pipeline.yml Adjusts reusable workflow invocation to make Codecov token available to the upload step.

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

Comment thread spec/spec_helper.rb
Comment thread spec/simplecov_helper.rb
Comment thread .github/workflows/pipeline.yml
@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 ☂️

- Pass secrets: inherit to the shared ruby-test-matrix workflow so CODECOV_TOKEN reaches the Codecov upload step
- Move the inline SimpleCov config into spec/simplecov_helper.rb, loaded first in spec_helper.rb so coverage starts before the gem code loads
- Emit coverage/lcov.info via simplecov-lcov on CI, HTML report locally
@dep
dep merged commit bd4a2c4 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