Skip to content

Commit c6b90d9

Browse files
committed
Switch from using Bors to merge queue in CI
1 parent eea9804 commit c6b90d9

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

.github/workflows/rust.yml

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: Rust
22

33
on:
4-
push:
5-
branches-ignore:
6-
- trying.tmp
7-
- staging.tmp
84
pull_request:
5+
merge_group:
96

107
jobs:
118
miri:
@@ -90,28 +87,14 @@ jobs:
9087
TARGET: x86_64-unknown-linux-gnu
9188
run: sh ci/run.sh
9289

93-
# These jobs doesn't actually test anything, but they're only used to tell
94-
# bors the build completed, as there is no practical way to detect when a
95-
# workflow is successful listening to webhooks only.
96-
#
97-
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
98-
99-
end-success:
100-
name: bors build finished
101-
if: github.event.pusher.name == 'bors' && success()
102-
runs-on: ubuntu-latest
103-
needs: [miri, rustfmt_clippy, test, msrv]
104-
105-
steps:
106-
- name: Mark the job as successful
107-
run: exit 0
108-
109-
end-failure:
110-
name: bors build finished
111-
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
90+
conclusion:
91+
needs: [test, msrv]
92+
# !cancelled() executes the job regardless of whether the previous jobs passed, failed or get skipped.
93+
if: ${{ !cancelled() }}
11294
runs-on: ubuntu-latest
113-
needs: [miri, rustfmt_clippy, test, msrv]
114-
11595
steps:
116-
- name: Mark the job as a failure
117-
run: exit 1
96+
- name: Conclusion
97+
run: |
98+
jq -C <<< '${{ toJson(needs) }}'
99+
# Check if all needs were successful.
100+
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)