-
Notifications
You must be signed in to change notification settings - Fork 11
37 lines (36 loc) · 1.15 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
name: "Unit tests"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
jobs:
all:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8.12, 3.11.7]
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python }}
- name: Install OpenMPI & Boost for gt4py
run: |
sudo apt-get install libopenmpi-dev libboost1.74-dev
- name: Install Python packages
run: |
python -m pip install --upgrade pip setuptools wheel
pip install .[test]
- name: Run serial-cpu tests
run: |
coverage run --rcfile=setup.cfg -m pytest -x tests
- name: Run parallel-cpu tests
run: |
mpirun -np 6 --oversubscribe coverage run --rcfile=setup.cfg -m mpi4py -m pytest -x tests/mpi
- name: Output code coverage
run: |
coverage combine
coverage report