This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
64 lines (55 loc) · 1.72 KB
/
Linux-UnitTests.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
name: Unit Tests
on:
pull_request:
paths:
- 'src/**'
- 'test/**'
- 'Project.toml'
- 'Manifest.toml'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
test-modules: ["Atmos,Common,InputOutput,Utilities",
"Driver",
"Diagnostics",
"Arrays,Numerics/ODESolvers,Numerics/SystemSolvers",
"Ocean",
"Land",]
env:
CLIMATEMACHINE_SETTINGS_FIX_RNG_SEED: "true"
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/[email protected]
- name: Set up Julia
uses: julia-actions/setup-julia@latest
with:
version: 1.5.4
# https://discourse.julialang.org/t/recommendation-cache-julia-artifacts-in-ci-services/35484
- name: Cache artifacts
uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Install Project Packages
run: |
julia --project=@. -e 'using Pkg; Pkg.instantiate()'
julia --project=@. -e 'using Pkg; Pkg.precompile()'
- name: Run Unit Tests
env:
TEST_MODULES: ${{ matrix.test-modules }}
run: |
julia --project=@. -e 'using Pkg; Pkg.test(test_args=map(String, split(ENV["TEST_MODULES"], ",")))'