From 287324d7ae75313cdffacce6d4f9e684b75f4c43 Mon Sep 17 00:00:00 2001 From: Philipp D Date: Tue, 3 Nov 2026 17:01:36 +0100 Subject: [PATCH] ci: a gate job reports for the whole workflow The jobs behind the path filter report nothing when skipped, and a skipped matrix job never reports `check ()`, so the branch ruleset's required checks could not be met by a change to the dashboard, the docs or the changelog alone: such a pull request needed an administrator's merge. `gate` runs always and fails when any job failed or was cancelled; a skipped job is no failure. The ruleset can then require `gate` alone. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/ci.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0a16389..9b9754bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,7 +180,8 @@ jobs: command: check advisories integration: - # The name stays `integration ()`: the branch ruleset requires it. + # The name stays `integration ()` while the branch ruleset requires it + # by name; `gate` below is the one name meant to replace that. name: integration (${{ matrix.os }}) needs: changes if: needs.changes.outputs.rust == 'true' @@ -310,3 +311,23 @@ jobs: $found = @('install.ps1', 'packaging/winget/render.ps1', 'packaging/winget/submit.ps1') | ForEach-Object { Invoke-ScriptAnalyzer -Path $_ -Severity Error } $found | Format-Table -AutoSize if ($found) { exit 1 } + + gate: + # The one check a pull request needs to be mergeable. The jobs above run + # only for what a change touches, and a skipped matrix job reports no + # `check ()` at all, so the branch ruleset cannot name them: a change to + # the dashboard or the docs alone could never meet it. This job reports + # always, and fails when any job above failed or was cancelled; a job that + # was skipped is not a failure. + needs: [changes, ui, check, msrv, deny, integration, remote-lane, scripts, scripts-windows] + if: always() + runs-on: ubuntu-latest + steps: + - name: no job failed + env: + RESULTS: ${{ join(needs.*.result, ' ') }} + run: | + echo "$RESULTS" + case " $RESULTS " in + *" failure "* | *" cancelled "*) exit 1 ;; + esac