Make coverage dependency optional for tests#185
Closed
samuel-williams-shopify wants to merge 1 commit into
Closed
Conversation
The default Test workflow does not produce coverage artifacts, but its bundle still installed covered and ruby-coverage. The latest ruby-coverage currently fails during installation on JRuby and Windows before io-event tests can run. Move covered into an optional coverage bundle group and only load covered/sus when COVERAGE is configured. The coverage workflow opts into that group with BUNDLE_WITH=coverage, preserving coverage reporting while keeping the plain test matrix focused on io-event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Keep coverage tooling out of the default test bundle and install it only for the coverage workflow.
Context
While following CI for another change, the plain
Testworkflow failed before runningio-eventtests because it installedcovered/ruby-coverage, even though that workflow does not produce coverage artifacts. The failures came from the coverage dependency installation on JRuby/Windows rather than from this project’s test suite.The
Test Coverageworkflow is the only workflow that needscovered.Changes
coveredinto an optionalcoverageBundler group.covered/susonly whenCOVERAGEis configured.Test Coverageworkflow into the optional coverage group withBUNDLE_WITH=coverage.Tophatting
ruby -c config/sus.rbruby -c gems.rbgit diff --check