CI: fix workflow startup_failure (matrix context in shell:)#1
Merged
Conversation
`shell: ${{ matrix.shell }}` is invalid -- the matrix context is not available in a step's shell: key, so GitHub rejects the workflow at parse time. That's a startup_failure: the whole run dies before any job starts, so BOTH matrix legs showed red with zero jobs and zero logs (runs even fired on non-main branches, since the branch filter never got evaluated). Broken since b1758f4 added the WinPS 5.1 leg.
Select the shell with two if-guarded run steps instead; matrix IS allowed in if:. Verified with actionlint (clean) and by running the full Pester suite on both pwsh 7 and Windows PowerShell 5.1 locally.
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.
Problem
CI has failed on every push since
b1758f4d("add Windows PowerShell 5.1 test leg"). Every run was astartup_failure: zero jobs, zero logs, both matrix legs red — and runs even fired on non-mainbranches, because GitHub couldn't parse the workflow far enough to apply the branch filter.Root cause
The
matrixcontext is not available in a step'sshell:key, so GitHub rejects the workflow at parse time — killing the entire run before any job starts. (actionlintflags exactly this line.) The tests themselves were never broken; they pass on both pwsh 7 and WinPS 5.1.Fix
Select the shell with two
if-guarded run steps (matrixis allowed inif:).Verification
actionlintclean (exit 0) on the fixed file.🤖 Generated with Claude Code