Gracefully skip macOS coverage gate when no tests#154
Closed
Chris-Wolfgang wants to merge 1 commit into
Closed
Conversation
Stage 3 macOS hard-failed when no coverage report existed, but the preceding step already gracefully skips report generation in that case. This template pack repo has no tests, so no coverage is expected. Now matches the Linux/Windows stages which guard their coverage gate on has-coverage output. Changed exit 1 to exit 0 with informational message so the gate skips cleanly instead of failing the build. Blocks dependabot PRs #149, #150. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the macOS PR workflow so the Stage 3 coverage gate no longer hard-fails when no coverage report is produced, aligning it more closely with this template-pack repository’s no-tests setup and unblocking dependency update PRs.
Changes:
- Changed the macOS coverage-threshold step to log an informational message and exit successfully when
CoverageReport/Summary.txtis missing. - Kept the existing macOS coverage-report generation flow intact while altering only the missing-report handling behavior.
- Aims to make macOS behavior consistent with the repository’s current “no tests / no coverage expected” CI reality.
Comment on lines
1216
to
+1218
| if [ ! -f "CoverageReport/Summary.txt" ]; then | ||
| echo "❌ Coverage report not generated!" | ||
| exit 1 | ||
| echo "ℹ️ No coverage report found - skipping coverage gate (no tests in this repo)" | ||
| exit 0 |
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.
Summary
Stage 3 macOS hard-fails when no coverage report exists, but the preceding "Generate coverage report" step already gracefully skips when no coverage files are found. This is inconsistent with Linux and Windows stages which both guard the coverage gate on
has-coverageoutput.This template pack repo has no tests, so no coverage is expected.
Changed
exit 1→exit 0with informational message in the macOS coverage gate.This unblocks dependabot PRs #149 and #150.
🤖 Generated with Claude Code