Skip to content

✅ Fix issues with simplecov v1.0 upgrade - #721

Merged
nevans merged 4 commits into
masterfrom
fix-simplecov-upgrade
Jul 23, 2026
Merged

✅ Fix issues with simplecov v1.0 upgrade#721
nevans merged 4 commits into
masterfrom
fix-simplecov-upgrade

Conversation

@nevans

@nevans nevans commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

There were a few issues that came from upgrading to v1.0 (in #718), one of which was identified by #717, but I didn't notice those issues until after merging both. Oops!

This updates the simplecov config in several ways:

  • updates to v1.0 config API, to avoid deprecation warnings
  • drops the broken joshmfrankel/simplecov-check-action action
  • replaces the minimum coverage criteria with simplecov's builtin config
    Note that normal test runs will not trigger any coverage requirements.
    Run rake coverage:report to trigger an error on low coverage.
  • enables "method" coverage
  • updates the groups so there aren't any "ungrouped" files
  • ratchets up the minimum coverage requirements to current level (will do in another PR)
  • to allow higher minimum coverage per file, this adds some exceptions for outlier files. (will do in another PR)
  • adds minimum coverage criteria for each group (will do in another PR)

A future PR will ratchet up the minimum coverage requirements and bring back something similar to joshmfrankel/simplecov-check-action. But this should be good enough for now.

@nevans
nevans force-pushed the fix-simplecov-upgrade branch from 10f5371 to 39a267f Compare July 22, 2026 17:59
nevans added 4 commits July 23, 2026 13:37
I think this was originally in test/lib/helper.rb for some strange
reason having to do with circular dependencies or some-such.  But, now
that simplecov v1.0 has pulled in the HTML and JSON formatters as part
of the core gem, that's no longer an issue.
In addition to the obvious changes (which had deprecation warnings):
* The HTML formatter includes the JSON formatter, so only the HTML
  formatter is used now.
* Use default simplecov primary_coverage.  I think I misunderstood how
  that was being measured before.  I wanted a count that _combines_
  lines and branches into a single number.
`joshmfrankel/simplecov-check-action` is broken with simplecov v1.0.
And simplecov can handle minimum coverage requirements on its own now.

`rake coverage:report` prints out the (already collected) coverage stats
and returns an error status when the minimum requirements aren't met.
@nevans
nevans force-pushed the fix-simplecov-upgrade branch from 416a120 to e38a03d Compare July 23, 2026 18:27
@nevans
nevans merged commit adfe70d into master Jul 23, 2026
34 checks passed
@nevans
nevans deleted the fix-simplecov-upgrade branch July 23, 2026 18:36
@nevans nevans changed the title ✅ Fix simplecov upgrade ✅ Fix issues with simplecov v1.0 upgrade Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant