Skip to content

Commit c6c7e57

Browse files
committed
Introduce required-checks CI job
GitHub Actions comes with an auto-merge feature, which allows for automatically merging PRs once certain requirements are met. For us, these requirements would be the passing of all CI checks. Alas, their !@#*&()$&@!(#* configuration requires us to explicitly list all CI jobs that need to pass, which is an absolute maintenance nightmare. To improve on the situation at least somewhat, introduce a job that captures all required checks, so that the definition of this arbitrary entity is at least co-located with the definition of these jobs and not hidden behind four layers of clicky-bunti UI fluff. The logic is adapted from: https://github.com/orgs/community/discussions/75568#discussioncomment-10351973 Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent 5454b55 commit c6c7e57

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,21 @@ jobs:
245245
run: sudo apt-get install --yes --no-install-recommends libelf-dev
246246
- uses: dtolnay/rust-toolchain@stable
247247
- run: cargo doc --locked --no-deps
248+
249+
required-checks:
250+
needs: [
251+
build-aarch64,
252+
build-armhf,
253+
build-capable,
254+
build-features,
255+
build-minimum,
256+
cargo-doc,
257+
clippy,
258+
run-tcp-ca,
259+
rustfmt,
260+
test,
261+
]
262+
if: always()
263+
runs-on: ubuntu-latest
264+
steps:
265+
- run: echo '${{ toJSON(needs) }}' | jq -e 'to_entries | all(.value.result == "success")'

0 commit comments

Comments
 (0)