Why the check never arrives#
A branch rule names checks, not workflows. When you require api-tests, GitHub waits for a check run with that name on the pull request's latest commit. The status checks reference lists the state it shows while it waits: expected, "The check run is waiting for a status to be reported."
A workflow-level paths filter decides whether the workflow runs at all. If every changed file falls outside the filter, no run starts, and no check run with that name is ever created. GitHub documents the result twice. The workflow syntax reference says that if a workflow is skipped by path filtering, branch filtering or a commit message, "checks associated with that workflow will remain in a 'Pending' state. A pull request that requires those checks to be successful will be blocked from merging." Workflow syntax: paths The troubleshooting guide's example ends with the pull request "blocked with 'Waiting for status to be reported,'" and its advice for this cause is short: "Avoid requiring workflows that can be skipped." Troubleshooting required status checks
The filter does not fail loudly. Nothing turns red, and the merge box shows a wait that never ends. Authors usually discover it on a documentation-only change, which is exactly the change the filter was written to save minutes on.
A fictional monorepo with one filtered workflow#
Suppose acme/platform keeps its API under services/api/ and runs the API tests from .github/workflows/api.yml with on: pull_request: paths: ['services/api/**']. The main branch ruleset requires api-tests. A pull request that fixes a typo in docs/setup.md starts no API workflow run, and the merge box waits for api-tests indefinitely. Someone with bypass permission merges it, and after the third such merge the team removes api-tests from the required list. From then on an API change with failing tests can merge too, which is the failure the requirement existed to stop.
The repair keeps the minutes saving and restores the requirement. The workflow triggers on every pull request and in the merge queue. A first job decides which areas changed, the expensive jobs run only for their area, and a final job named ci-gate is the only check the ruleset requires.
name: ci
on:
pull_request:
merge_group:
permissions:
contents: read
pull-requests: read
jobs:
changes:
runs-on: ubuntu-latest
outputs:
api: ${{ steps.filter.outputs.api }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
api:
- 'services/api/**'
api-tests:
needs: changes
if: needs.changes.outputs.api == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: make -C services/api test
ci-gate:
if: ${{ always() }}
needs: [changes, api-tests]
runs-on: ubuntu-latest
steps:
- name: Fail if a needed job failed or was cancelled
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
- run: echo "Needed jobs passed or were skipped by the path filter."
The dorny/paths-filter action does the per-job path decision that the built-in filter cannot; its README says the built-in path filters "don't work on a level of individual jobs or steps," and that on pull_request it reads the changed files through the REST API, which is why the workflow grants pull-requests: read (README, read 2026-11-23). The gate's needs.*.result expression uses the documented object filter and contains.
The gate uses always() on purpose. Jobs listed in needs that fail cause the dependent job to be skipped "unless the jobs use a conditional expression that causes the job to continue" (workflow syntax: needs), and the troubleshooting guide's fix for a required job that depends on others is to "Use always() with needs." Without it, a failing api-tests would skip ci-gate, and a skipped job reports success. That second trap has its own guide: a skipped job satisfies a required check.
What the gate does not catch#
The gate only reflects the jobs it lists. Add a new job and forget to put it in ci-gate's needs, and its failures never block a merge. The path filter is also a claim about dependencies: if services/api/ imports code from libs/, an edit to libs/ alone skips the API tests unless the filter lists libs/** too. GitHub cannot know that relationship, and neither can the gate.
The gate treats a skipped job as acceptable, because that is what the filter produces. A job that is skipped for some other reason, such as a typo in its if: expression, also passes through. Read the gate's summary of needs results when a pull request merges suspiciously fast.
Finally, the merge_group trigger matters. A required check that runs only on pull_request never reports inside a merge queue, and the queue fails for the same reason a filtered workflow waits. The merge queue guide covers that case.
What it costs#
Every pull request now starts a workflow run, even one that changes only documentation. The changes and ci-gate jobs are short, but each one still queues for a runner. You trade that for a requirement that holds on every pull request instead of one that people learn to bypass.
There is also a migration step. Add ci-gate to the workflow and merge it first, so the check has run on the repository before you require it; the troubleshooting guide notes that a required check "must have completed successfully in the chosen repository during the past seven days." Then replace the old required names with ci-gate in the ruleset. Open pull requests created before the change need a new push or an update from the base branch before their runs include the gate.
The decision#
Require checks only from workflows that start on every pull request and on merge_group. If you want path-based savings, make them inside the workflow with job conditions, and require a single gate job that runs with always() and fails on any failed or cancelled dependency. Review the gate's needs list whenever someone adds a job, since that list is now the real merge policy.