-
Notifications
You must be signed in to change notification settings - Fork 234
99 lines (86 loc) · 2.9 KB
/
Tests.yml
File metadata and controls
99 lines (86 loc) · 2.9 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Tests
on:
push:
branches:
- main
pull_request:
merge_group:
types: [checks_requested]
# Cancel existing tests on the same PR if a new commit is added to a pull request
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
# Use matrix.test.name here to avoid it taking up the entire window width
name: test ${{matrix.test.name}} (${{ matrix.runner.version }}, ${{ matrix.runner.os }}, ${{ matrix.runner.num_threads }})
runs-on: ${{ matrix.runner.os }}
continue-on-error: ${{ matrix.runner.version == 'pre' }}
strategy:
fail-fast: false
matrix:
test:
# Run some of the slower test files individually. The last one catches everything
# not included in the others.
- name: "mcmc/gibbs"
args: "mcmc/gibbs.jl"
- name: "mcmc/Inference"
args: "mcmc/Inference.jl"
- name: "ad"
args: "ad.jl"
- name: "everything else"
args: "--skip mcmc/gibbs.jl mcmc/Inference.jl ad.jl"
runner:
# Default
- version: '1'
os: ubuntu-latest
num_threads: 1
# Multithreaded
- version: '1'
os: ubuntu-latest
num_threads: 2
# Windows
- version: '1'
os: windows-latest
num_threads: 1
# macOS
- version: '1'
os: macos-latest
num_threads: 1
# Minimum supported Julia version
- version: 'min'
os: ubuntu-latest
num_threads: 1
# Minimum supported Julia version, multithreaded
- version: 'min'
os: ubuntu-latest
num_threads: 2
# TODO(mhauru) Start running 'pre' again once it differs from '1'.
# Pre-release Julia version
# - version: 'pre'
# os: ubuntu-latest
# num_threads: 1
steps:
- name: Print matrix variables
run: |
echo "OS: ${{ matrix.runner.os }}"
echo "Julia version: ${{ matrix.runner.version }}"
echo "Number of threads: ${{ matrix.runner.num_threads }}"
echo "Test arguments: ${{ matrix.test.args }}"
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '${{ matrix.runner.version }}'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
test_args: ${{ matrix.test.args }}
env:
JULIA_NUM_THREADS: ${{ matrix.runner.num_threads }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true