Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup CI #1

Merged
merged 4 commits into from
Jan 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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