Skip to content

Commit

Permalink
Setup CI (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored Jan 6, 2022
1 parent 7054034 commit 6f65f92
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
julia-version:
- '1'
# - '1.6'
- 'nightly'
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: ./lcov.info
flags: Pkg.test
name: codecov-umbrella
check:
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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash

0 comments on commit 6f65f92

Please sign in to comment.