Skip to content

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

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

non-production: set up codecov in this repo#8
dep merged 1 commit into
mainfrom
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.
  • Move the existing SimpleCov config out of spec/spec_helper.rb into spec/simplecov_helper.rb, required before the gem code loads. Previously SimpleCov started after active_record/data_classification was already required, so lib files were not measured. On CI it emits coverage/lcov.info via simplecov-lcov; locally it uses the HTML formatter.
  • Add repo-level codecov.yml with target: auto / 1% threshold for project and patch statuses, since measured coverage is at or below 80%.

Measured local coverage: 31.9% line coverage (9 examples, 0 failures on Ruby 3.2.1). Verified coverage/lcov.info is generated with GITHUB_ACTIONS=true.

No dependency changes needed: simplecov and simplecov-lcov were already in the Gemfile and Gemfile.lock, and /coverage/ was already gitignored.

@coveralls

coveralls commented Jul 13, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29343722369

Coverage decreased (-68.1%) to 31.9%

Details

  • Coverage decreased (-68.1%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 279
Covered Lines: 89
Line Coverage: 31.9%
Coverage Strength: 0.51 hits per line

💛 - Coveralls

@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 jebentier 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 Codecov reporting for this gem by ensuring coverage is collected correctly during CI runs and by configuring Codecov’s status checks.

Changes:

  • Start SimpleCov before the gem code loads by moving coverage setup into spec/simplecov_helper.rb.
  • Emit coverage/lcov.info on GitHub Actions (and HTML locally) to support Codecov uploads.
  • Configure Codecov status thresholds via codecov.yml, and pass secrets through the reusable CI workflow.

Reviewed changes

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

File Description
spec/spec_helper.rb Requires the new SimpleCov bootstrap before loading the gem under test.
spec/simplecov_helper.rb Centralizes SimpleCov configuration and switches formatters based on CI vs local runs.
codecov.yml Adds Codecov status configuration with low thresholds and target: auto.
.github/workflows/pipeline.yml Updates the reusable workflow job to pass secrets through for Codecov uploads.

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

Comment thread .github/workflows/pipeline.yml
Comment thread spec/simplecov_helper.rb
@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 existing SimpleCov config into spec/simplecov_helper.rb, loaded before the gem code so coverage is measured correctly, emitting coverage/lcov.info on CI
- Add repo-level codecov.yml (coverage at or below 80%)
@dep
dep merged commit af65c2c into main Jul 21, 2026
29 checks passed
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.

4 participants