Skip to content

Commit 05a53a3

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

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/bindgen.yml

+19
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,19 @@ 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+
name: Success
266+
runs-on: ubuntu-latest
267+
needs: [rustfmt-clippy, msrv, minimal, docs, quickchecking, test-expectations, test, check-cfg, test-book]
268+
# GitHub branch protection is exceedingly silly and treats "jobs skipped
269+
# because a dependency failed" as success. So we have to do some
270+
# contortions to ensure the job fails if any of its dependencies fails.
271+
if: always() # make sure this is never "skipped"
272+
steps:
273+
# Manually check the status of all dependencies. `if: failure()` does not work.
274+
- name: check if any dependency failed
275+
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)