-
Notifications
You must be signed in to change notification settings - Fork 11
85 lines (81 loc) · 2.65 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Run tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the main branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 120
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
strategy:
fail-fast: false
matrix:
julia-version:
- '1.6'
- '1.9'
- '~1.10.0-0'
- 'nightly'
julia-arch:
- x64
os:
- ubuntu-latest
include:
# Add a few macOS jobs (not too many, the number we can run in parallel is limited)
- julia-version: '1.6'
julia-arch: x64
os: macOS-latest
- julia-version: 'nightly'
julia-arch: x64
os: macOS-latest
steps:
- uses: actions/checkout@v2
with:
# For Codecov, we must also fetch the parent of the HEAD commit to
# be able to properly deal with PRs / merges
fetch-depth: 2
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
- name: "Build package"
uses: julia-actions/julia-buildpkg@latest
- name: "Run tests"
uses: julia-actions/julia-runtest@latest
- name: "Run doctests"
if: ${{ matrix.julia-version == '1.6' }}
run: |
julia --project=docs --color=yes --code-coverage -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
using Documenter: doctest
using AlgebraicSolving
doctest(AlgebraicSolving)'
- name: "Process code coverage"
uses: julia-actions/julia-processcoverage@v1
with:
directories: src
- name: "Upload coverage data to Codecov"
continue-on-error: true
uses: codecov/codecov-action@v2
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}