From d38f120095cadda176b7f4707aea72b716a7e6a8 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Sat, 9 Mar 2024 17:19:39 +0100 Subject: [PATCH] ci: Adopt conclusion job that summarizes ci status Originally contributed by @messense in pyo3, copied their solution with thanks. --- .github/workflows/{pr-check.yml => ci.yaml} | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) rename .github/workflows/{pr-check.yml => ci.yaml} (74%) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/ci.yaml similarity index 74% rename from .github/workflows/pr-check.yml rename to .github/workflows/ci.yaml index 76abf49fd..2da6bcd8d 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/ci.yaml @@ -2,7 +2,7 @@ on: pull_request: merge_group: -name: CI Check +name: Continuous integration env: CARGO_TERM_COLOR: always @@ -28,6 +28,7 @@ jobs: tests: if: ${{ github.event_name == 'merge_group' }} runs-on: ubuntu-latest + name: tests/${{ matrix.platform.rust-target }}/${{ matrix.rust }} strategy: matrix: rust: @@ -49,6 +50,7 @@ jobs: cross_test: if: ${{ github.event_name == 'merge_group' }} runs-on: ubuntu-latest + name: cross_test/${{ matrix.platform.rust-target }}/${{ matrix.rust }} strategy: matrix: include: @@ -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) }}