Skip to content

Commit

Permalink
Use tkf/merge-conclusions-action (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored Mar 19, 2022
1 parent 0ecc03e commit 1bff512
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1bff512

Please sign in to comment.