Skip to content

Skip pr.yaml test stages when ./tests directory is missing#138

Merged
Chris-Wolfgang merged 1 commit intomainfrom
fix/pr-yaml-skip-missing-tests
Apr 25, 2026
Merged

Skip pr.yaml test stages when ./tests directory is missing#138
Chris-Wolfgang merged 1 commit intomainfrom
fix/pr-yaml-skip-missing-tests

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

Summary

Changes

  • Stage 1 (Linux) — exit 0 with info message when ./tests doesn't exist or contains no test projects.
  • Stage 2 (Windows / pwsh) — same, plus added -ErrorAction SilentlyContinue to Get-ChildItem.
  • Stage 3 (macOS) — same for the test step, and the Enforce 90% coverage threshold step now skips (instead of exit 1) when Summary.txt wasn't generated.
  • Build, security scan, gitleaks, and detect-projects jobs are unchanged — they still run on every PR.

release.yaml and scripts/build-pr.ps1 did not need updates (release.yaml doesn't reference ./tests; build-pr.ps1 already had this behavior).

Test plan

🤖 Generated with Claude Code

Brings the workflow in line with scripts/build-pr.ps1, which already skips
test execution when there are no test projects. Template repos like this
one have no tests by design, but still benefit from the build, security,
and gitleaks stages.

Changes:
- Stage 1 (Linux), Stage 2 (Windows), Stage 3 (macOS) test steps now exit 0
  with an informational message when ./tests is absent or empty.
- Stage 3 coverage threshold step skips instead of failing when no
  Summary.txt was generated (the prior step already handles missing
  coverage internally).

Build, security scan, and gitleaks jobs still run on every PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Chris-Wolfgang Chris-Wolfgang merged commit b23ae1e into main Apr 25, 2026
12 of 13 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the fix/pr-yaml-skip-missing-tests branch April 25, 2026 17:15
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.

1 participant