Repository navigation
ci: test the oracle marker check only when it changes - #2167
Conversation
The oracle marker check tests install Pester from PSGallery, and that download fails at times, failing CI for commits that never touched the check. The tests now run only when the commit changes the check or its tests, compared with the commit's first parent, which for a pull request is its base branch. Manual and release runs still run them every time. The steps are skipped rather than the job, because the success job requires every job to succeed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Let maintainers know that an action is required on their side
|
There was a problem hiding this comment.
🟢 Approval recommended
The narrow CI change matches the stated behavior, preserves required-job handling, and has no unresolved findings.
No open issues 🎉
What changed in this PR
This PR reduces unrelated CI failures from PSGallery downloads by running the oracle marker check tests only when relevant files change.
Changes:
- Fetches two commits to compare the checked-out commit with its first parent.
- Gates Pester installation and tests on changes to the check or its tests, while retaining unconditional manual and release runs.
- Skips individual steps rather than the job, preserving required-job success handling.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds change detection and conditional execution for the oracle marker check tests. |
Review effort: Balanced
|
Lines changed, against master:
The whole change is in Note LLM-assisted content (no human feedback). |
PSGallery intermittently answers that no module named Pester matches, which fails CI for a reason that has nothing to do with the change. #2167 stopped the oracle marker check tests from installing Pester when the check is unchanged, but the PowerShell module job and the Windows service account tests still install it on every run, and the oracle marker check tests still install it when the check changes. Each Pester install now makes up to four attempts, waiting 30, 60 and 90 seconds between them, and fails with PSGallery's error once all four fail, like the Chocolatey installs (#2115). The loop is inline in each step because these jobs may check out an older commit than the workflow's own. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The oracle marker check tests install Pester from PSGallery, and that download fails at times, failing CI for commits that never touched the check.
The tests now run only when the commit changes the check or its tests, compared with the commit's first parent, which for a pull request is its base branch. Manual and release runs still run them every time. The steps are skipped rather than the job, because the success job requires every job to succeed.
Co-authored-by: Claude Opus 5.5 noreply@anthropic.com