-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (61 loc) · 1.85 KB
/
ClimaCoreVTK.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
name: ClimaCoreVTK CI
on:
pull_request:
paths:
- ".github/workflows/ClimaCoreVTK.yml"
- "lib/ClimaCoreVTK/**"
push:
branches:
- staging
- trying
jobs:
lib-climacore-vtk:
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.8'
- 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 Paraview
run: |
sudo apt-get update && sudo apt-get -y install paraview python3-paraview
- name: Install Julia dependencies
shell: julia --project=monorepo {0}
run: |
using Pkg;
# dev mono repo versions
pkg"dev . lib/ClimaCoreVTK"
- name: Run the tests
env:
CI_OUTPUT_DIR: output
run: >
julia --project=monorepo -e 'using Pkg; Pkg.test("ClimaCoreVTK")'
&& echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV
- name: Render the VTK images
run: >
for f in lib/ClimaCoreVTK/test/output/*.vtu;
do
xvfb-run -a pvpython lib/ClimaCoreVTK/paraview/renderimage.py "$f" "$f.png";
done
continue-on-error: true
- name: Upload test Artifacts
uses: actions/upload-artifact@v2
with:
name: climacore-vtk-output
path: |
lib/ClimaCoreVTK/test/output/*.png
- name: Fail after artifacts if tests failed
if: ${{ env.TESTS_SUCCESSFUL != 'true' }}
run: exit 1