-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (43 loc) · 1.4 KB
/
ClimaCorePlots.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
name: ClimaCorePlots CI
on:
pull_request:
jobs:
lib-climacore-plots:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
- uses: actions/cache@v3
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 Julia dependencies
run: >
julia --project=monorepo -e 'using Pkg; Pkg.develop(path="$(pwd())"); Pkg.develop(path="$(pwd())/lib/ClimaCorePlots")'
- name: Run the tests
continue-on-error: true
env:
GKSwstype: nul
CI_OUTPUT_DIR: output
run: >
julia --project=monorepo -e 'using Pkg; Pkg.test("ClimaCorePlots")'
&& echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV
- name: Upload test Artifacts
uses: actions/upload-artifact@v2
with:
name: climacore-plots-output
path: |
lib/ClimaCorePlots/test/output
- name: Fail after artifacts if tests failed
if: ${{ env.TESTS_SUCCESSFUL != 'true' }}
run: exit 1