Skip to content

NDSL unit tests

NDSL unit tests #1470

Workflow file for this run

name: "NDSL unit tests"
# Run these these whenever ...
on:
pull_request: # ... a PR is opened / updated
merge_group: # ... the PR is added to the merge queue
push:
branches:
- main # ... when merging into the main branch
# 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
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13']
name: Python ${{ matrix.python-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: 'recursive'
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install mpi (MPICH flavor)
run: pip3 install mpich
- name: Install Python packages
run: pip3 install .[test,zarr]
- name: Run serial cpu tests
run: coverage run --rcfile=pyproject.toml -m pytest -m "not parallel and not gpu" tests
- name: Run parallel cpu tests
run: mpiexec -np 6 coverage run --rcfile=pyproject.toml -m mpi4py -m pytest -m "parallel and not gpu" tests
- name: Output code coverage
run: |
coverage combine
coverage report