-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (62 loc) · 2.08 KB
/
pythonUnitTest.yaml
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
name: Python Unit Tests
on:
push:
branches:
- '*'
paths-ignore:
- '.github/**'
- '**/workflows/**'
env:
LD_LIBRARY_PATH: /home/runner/hdf5-dir/lib
PYTHONPATH: /home/runner/work/mushy-layer/mushy-layer/test:/home/runner/work/mushy-layer/mushy-layer/plotting
UNIT_TEST_PATH: /home/runner/work/mushy-layer/mushy-layer/test/unit
UNIT_TEST_PUBLISH: /home/runner/work/mushy-layer/mushy-layer/master/test/unit/coverage/
jobs:
build:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup environmental variables
run: |
echo "CHOMBO_HOME=$(echo $HOME)/chombo/lib" >> $GITHUB_ENV
echo "CHOMBO_ROOT=$(echo $HOME)/chombo" >> $GITHUB_ENV
echo "HDF5_PATH=$(echo $HOME)/hdf5-dir" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH):$(echo $HDF5_PATH)/lib" >> $GITHUB_ENV
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" >> $GITHUB_ENV
- name: Setup latex
run: |
whereis latex
sudo apt-get install texlive-full texlive-fonts-recommended texlive-fonts-extra
sudo apt-get install dvipng
whereis latex
pdflatex --version
- name: Info
run: |
echo $CHOMBO_HOME
echo $HOME
echo $LD_LIBRARY_PATH
echo $GITHUB_WORKSPACE
# Do regression tests
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.10
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install python dependencies
run: pip install --upgrade pip && pip install -r requirements.txt
- name: Setup for tests
run: |
cd $GITHUB_WORKSPACE
python install.py -g
- name: Run Unit Tests
run: |
cd $UNIT_TEST_PATH
py.test