Repository navigation
ci: fail the coverage gate when coverage drops below the floor - #205
Merged
Merged
Conversation
The Enforce coverage floor step pipes check_coverage.sh into tee. The default run shell is bash -e without pipefail, so the step took the exit code of tee and passed even when coverage was below 85%. Setting shell: bash makes GitHub run the step with -eo pipefail. Add a repo test that fails if the coverage step pipes into tee without pipefail.
PaxMachinaOne
approved these changes
Oct 17, 2026
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.
The Enforce coverage floor step runs
bash hack/check_coverage.sh 85 | tee coverage.txt. The default run shell isbash -ewithout pipefail, so the step took the exit code ofteeand passed even when the script exited 1 for coverage under 85%.This adds
shell: bashto that step, so GitHub runs it with-eo pipefail. It also addstest/workflow_pipefail_test.go, which fails if the coverage step pipes intoteewithout pipefail.No conflict with #204: it is already merged and this branch is based on it.
Coverage on main today is 85.7% locally, so the fixed gate passes now with little headroom.