A workflow-level paths filter leaves a required check pending on docs-only PRs
Symptom#
A docs-only PR cannot merge. GitHub shows "Expected - waiting for status to be reported" for the required test check. The check never runs, so it never reports.
Cause#
paths under on: pull_request or on: push stops the whole workflow from starting when no matching file changed. A skipped workflow reports no status. If branch rules require one of its jobs, GitHub waits forever.
Fix#
Remove paths from the workflow triggers so the workflow always starts. Add a changes job that uses dorny/paths-filter and outputs code. Gate the test job with needs: changes and if: needs.changes.outputs.code == 'true'. Keep tags and workflow_dispatch always testing. Add a tests-ok job with if: always() and needs: [changes, build-and-test]. It passes when the tests pass or are skipped and fails otherwise. In the branch rules, require only tests-ok. Swap the required checks after the PR merges, because the old matrix check names stay pending when the tests skip.
Evidence#
Found in dfanalyzer on branch ci/develop-prebuilt-wheels. The first fix was a workflow-level paths filter in .github/workflows/ci.yml. The user then said the check is required, and the gate-job fix replaced it. Only a YAML syntax check ran; nothing ran on GitHub.