-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (31 loc) · 1 KB
/
unit_tests.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
name: "NDSL unit tests"
on:
pull_request:
# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ndsl_unit_tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/noaa-gfdl/miniforge:mpich
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Python packages
run: pip3 install .[test]
- name: prepare input eta files
run: |
cd ${GITHUB_WORKSPACE}/ndsl
python tests/grid/generate_eta_files.py
- name: Run serial-cpu tests
run: coverage run --rcfile=setup.cfg -m pytest -x tests
- name: Run parallel-cpu tests
run: mpiexec -np 6 --oversubscribe coverage run --rcfile=setup.cfg -m mpi4py -m pytest -x tests/mpi
- name: Output code coverage
run: |
coverage combine
coverage report