-
Notifications
You must be signed in to change notification settings - Fork 5
93 lines (74 loc) · 2.5 KB
/
advanced_tests.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
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
name: Advanced tests
on:
pull_request:
types: [ready_for_review, opened]
branches: [main]
jobs:
run-advanced-tests:
strategy:
matrix:
os: [ubuntu-latest, macos-13]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
# check out PR HEAD commit
- name: check out PR HEAD commit
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# set up a conda environment
- name: set up miniconda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: testing-env
python-version: ${{ matrix.python-version }}
auto-update-conda: true
mamba-version: "*"
miniconda-version: "latest"
channels: conda-forge
channel-priority: true
# install dependencies on conda environment
- name: install package dependencies
run: |
mamba install udunits2=2.2.25
mamba install --file=requirements.txt
mamba install --file=requirements-tests.txt
# build dummy components required for tests
- name: make gfortran available (macos only)
if: matrix.os == 'macos-13'
run: |
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@11*/lib/gcc/11 /usr/local/gfortran/lib
gfortran --version
- name: build dummy C and Fortran components
run: |
(cd ./tests/tests/components && make)
# install latest cf-python package
- name: install package
run: |
pip install https://github.com/NCAS-CMS/cf-python/archive/main.zip
# install package
- name: install package
run: |
pip install -e .
# run tests
- name: run advanced tests 1 (SameTimeSameSpace)
run: |
(cd ./tests && python run_stss_tests.py)
# run tests
- name: run advanced tests 2 (SameTimeDiffSpace)
run: |
(cd ./tests && python run_stds_tests.py)
# run tests
- name: run advanced tests 3 (DiffTimeSameSpace)
run: |
(cd ./tests && python run_dtss_tests.py)
# run tests
- name: run advanced tests 4 (DiffTimeDiffSpace)
run: |
(cd ./tests && python run_dtds_tests.py)