Skip to content

Commit

Permalink
ci: Adopt conclusion job that summarizes ci status
Browse files Browse the repository at this point in the history
Originally contributed by @messense in pyo3, copied their solution with
thanks.
  • Loading branch information
bluss committed Mar 9, 2024
1 parent fe3eb5a commit b4440c3
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/pr-check.yml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
pull_request:
merge_group:

name: CI Check
name: Continuous integration

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -36,6 +36,7 @@ jobs:
- nightly
- 1.51.0 # MSRV

name: tests/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand All @@ -57,6 +58,7 @@ jobs:
- rust: stable
target: i686-unknown-linux-gnu

name: cross_test/${{ matrix.include.target }}/${{ matrix.include.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand All @@ -67,3 +69,19 @@ jobs:
- name: Install cross
run: cargo install cross
- run: ./scripts/cross-tests.sh "docs" ${{ matrix.rust }} ${{ matrix.target }}

conclusion:
needs:
- clippy
- tests
- cross_test
if: always()
runs-on: ubuntu-latest
steps:
- name: Result
run: |
jq -C <<< "${needs}"
# Check if all needs were successful or skipped.
"$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")"
env:
needs: ${{ toJson(needs) }}

0 comments on commit b4440c3

Please sign in to comment.