From 723e164928c3c768df95489d33e11f7b3a618312 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sat, 19 Mar 2022 06:44:04 -0400 Subject: [PATCH] Use tkf/merge-conclusions-action --- .github/workflows/test.yml | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dde4297..d5f852e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,27 +28,14 @@ jobs: file: ./lcov.info flags: Pkg.test name: codecov-umbrella - check: + + # A job that succeeds if and only if all jobs in `test` succeed. + all-success: if: always() && github.event.pull_request needs: test runs-on: ubuntu-latest steps: - - name: "Dump jobs' conclusion" - run: | - gh api repos/tkf/Try.jl/actions/runs/${{ github.run_id }}/jobs \ - --jq '.jobs[] | select(.conclusion != null) | { name, conclusion }' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - - name: "Check test matrix" - run: | - num_non_successes="$( - gh api repos/tkf/Try.jl/actions/runs/${{ github.run_id }}/jobs \ - --jq '[.jobs[] | select(.conclusion != null) | .conclusion | select(. != "success")] | length' \ - )" - - echo "num_non_successes = $num_non_successes" - [ "$num_non_successes" = 0 ] - env: + # https://github.com/tkf/merge-conclusions-action + - uses: tkf/merge-conclusions-action@v1 + with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash