ci: run module tests on Windows PowerShell 5.1 in shared workflow#7
Merged
tablackburn merged 2 commits intoJun 4, 2026
Merged
Conversation
Add a dedicated `test_powershell` job that builds and runs the full test suite (`build.ps1 -Task Test -Bootstrap`) under Windows PowerShell 5.1 (Desktop) on windows-latest, alongside the existing PowerShell 7+ matrix. Desktop is not a runner OS, so it runs as its own job using the built-in `powershell` shell. Wire its results into publish-test-results. Modules that declare Windows PowerShell (Desktop) support need the lowest supported engine exercised by CI; PowerShellBuild 0.8.0 shipped a PS7-only ternary that broke import on 5.1 and a pwsh-only test run did not catch it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a dedicated Windows PowerShell 5.1 test job to CI and wires it into the unit test results publishing flow.
Changes:
- Add a
test_powershelljob that runs tests under Windows PowerShell 5.1 (shell: powershell) onwindows-latest. - Update
publish-test-resultsto depend on bothtestandtest_powershelljobs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tablackburn
added a commit
to psake/PowerShellBuild
that referenced
this pull request
Jun 3, 2026
Point the caller's TODO at the upstream PR that adds the Windows PowerShell 5.1 (test_powershell) job to the shared workflow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
HeyItsGilbert
approved these changes
Jun 3, 2026
Switch publish-test-results gate from `success() || failure()` to `!cancelled()` so results still publish if a needed test job is skipped, and update the stale comment that only referenced the single test job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tablackburn
added a commit
to psake/PowerShellBuild
that referenced
this pull request
Jun 4, 2026
psake/.github#7 is merged; staying on @main intentionally for this internal CI workflow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Adds a dedicated
test_powershelljob to the sharedModuleCI.ymlthat builds and runs the full test suite under Windows PowerShell 5.1 (Desktop), alongside the existing PowerShell 7+ matrix (ubuntu/windows/macOS).Desktop is not a runner OS, so it runs as its own job on
windows-latestusing the built-inpowershellshell:Its results are wired into
publish-test-results(needs: [test, test_powershell]).Motivation
Modules that declare Windows PowerShell (Desktop) support need the lowest supported engine exercised by CI, not just PowerShell 7+. PowerShellBuild 0.8.0 shipped a PS7-only ternary that broke module import on 5.1, and the pwsh-only test run did not catch it (psake/PowerShellBuild#126).
Notes / compatibility
testjob (id andRun Pwsh Testsname) is unchanged, so no required-status-check names change for current consumers.uses:yet — fix: restore Windows PowerShell 5.1 import compatibility PowerShellBuild#126 is the first adopter — so blast radius today is limited to that PR.workflow_callinput; left unconditional for now per maintainer direction.🤖 Generated with Claude Code