Skip to content

CI: "CI Results" required check passes when checks or test fail (gate job is skipped) #327

Open

Description

@sotomayorlucas

The results job ("CI Results") in .github/workflows/ci.yml has needs: ["checks", "test"] and no if: condition, so GitHub applies success(). When checks or test fails, results is skipped rather than failing, and GitHub treats a skipped required check as passing.

results:
name: "CI Results"
needs: ["checks", "test"]
runs-on: ubuntu-latest
permissions: {}
steps:
- run: exit 0

This looks like what happened on #294: it was auto-merged while checks was failing ("29 of 30 checks passed"), which the later "Fix check errors" commit notes should not have been mergeable. In the last ~70 pull-request runs, 9 had checks failing with "CI Results" skipped.

Suggested fix

  results:
    name: "CI Results"
    needs: ["checks", "test"]
    if: ${{ !cancelled() }}
    runs-on: ubuntu-latest
    permissions: {}
    steps:
    - if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
      run: exit 1
    - run: exit 0

!cancelled() makes the gate run (and fail) when a need fails or times out; when the whole run is cancelled, e.g. superseded by a newer push, it is still skipped. I checked the skipped-on-failure behavior in a test repository. Happy to open a PR if that's easier.

Activity

  1. added 4 commits that reference this issue on Nov 4, 2026
    d7f46dc
    448a058
    5d45f7e
    8d3816d
  2. masklinn commented on Nov 4, 2026

    @masklinn
    Contributor

    Thanks for the report, and for the answer to the question I asked to myself in #295 (but didn't look too hard for the answer). Should be fixed by #328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions