Skip to content

Modernization

Modernization #6

Workflow file for this run

name: Run tests
on:
push:
branches:
- master
- main
pull_request:
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Don't cancel other jobs if one fails
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Python 3.7 is no longer available on the -latest series (except for Windows)
python-version: ["3.8", "3.13"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for git history (tags)
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist --editable .
python -m pip freeze --local
- name: Run tests not requiring xarray
run: |
python -m pytest tests -v -n auto --ignore tests/test_run_sample.py
- name: Install xarray
run: |
python -m pip install xarray
- name: Run tests requiring xarray
run: |
python -m pytest tests/test_run_sample.py -v -n auto