Skip to content

Commit 9e004e9

Browse files
committed
ci: Try to enable merge queue.
1 parent 7c6858d commit 9e004e9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/bindgen.yml

+18
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
pull_request:
88
branches:
99
- main
10+
merge_group:
11+
branches:
12+
- main
1013

1114
jobs:
1215
rustfmt-clippy:
@@ -254,3 +257,18 @@ jobs:
254257
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar xz
255258
./mdbook build book
256259
./mdbook test book
260+
261+
# One job that "summarizes" the success state of this pipeline. This can then
262+
# be added to branch protection, rather than having to add each job
263+
# separately.
264+
success:
265+
runs-on: ubuntu-latest
266+
needs: [rustfmt-clippy, msrv, minimal, docs, quickchecking, test-expectations, test, check-cfg, test-book]
267+
# GitHub branch protection is exceedingly silly and treats "jobs skipped
268+
# because a dependency failed" as success. So we have to do some
269+
# contortions to ensure the job fails if any of its dependencies fails.
270+
if: always() # make sure this is never "skipped"
271+
steps:
272+
# Manually check the status of all dependencies. `if: failure()` does not work.
273+
- name: check if any dependency failed
274+
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)