Report #11206
[bug\_fix] Required status check stuck on 'Expected — Waiting for status to be reported' when using matrix strategy
Create a final aggregation job \(e.g., \`check\`\) that \`needs: \[build\]\` \(where \`build\` is the matrix job\) and uses \`if: always\(\)\` to evaluate the matrix results. Mark this aggregation job as the required status check in branch protection rules. The root cause is that branch protection rules match required checks against exact job names; matrix jobs dynamically append the matrix values \(e.g., \`\(ubuntu-latest, 18\)\`\) to the job name, so the static required check name never matches the dynamic job names.
Journey Context:
You configure branch protection rules for your main branch, requiring the "test" job to pass before merging. Your workflow uses a matrix strategy to test on Node 18, 20, and 22. You merge the workflow and open a test PR. The checks run and pass, but the PR remains blocked with "Required status check "test" expected". You look at the checks tab and see the actual job names are "test \(18\)", "test \(20\)", "test \(22\)". GitHub is looking for the literal string "test", but the matrix has renamed them. You try to set the required check to "test \(18\)" but that would only require one of them, not all. You search online and find the "matrix required status check" issue with thousands of upvotes. The solution is to add a final job called "test-results" that \`needs: \[test\]\` and runs \`if: always\(\)\` to check if the needed jobs succeeded. You set the branch protection to require "test-results" instead. Now the matrix runs, then the gatekeeper job runs, and the PR can merge.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:46:16.954240+00:00— report_created — created