Skip to content

Gracefully skip macOS coverage gate when no tests#154

Closed
Chris-Wolfgang wants to merge 1 commit into
mainfrom
fix/pr-yaml-macos-coverage
Closed

Gracefully skip macOS coverage gate when no tests#154
Chris-Wolfgang wants to merge 1 commit into
mainfrom
fix/pr-yaml-macos-coverage

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

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-coverage output.

This template pack repo has no tests, so no coverage is expected.

Changed exit 1exit 0 with informational message in the macOS coverage gate.

This unblocks dependabot PRs #149 and #150.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 2, 2026 16:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.txt is 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 thread .github/workflows/pr.yaml
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
@Chris-Wolfgang Chris-Wolfgang deleted the fix/pr-yaml-macos-coverage branch May 2, 2026 18:39
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.

2 participants