Skip to content

Add CI workflow and a network test marker #1

Add CI workflow and a network test marker

Add CI workflow and a network test marker #1

Workflow file for this run

name: tests
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install the package with all extras
run: pip install ".[netcdf,bigquery,dask,dev]"
# The suite prints a COVERAGE GAP banner when an optional module
# is missing and its tests silently skip. All extras are
# installed above, so a banner means the pass count excludes
# code this run was meant to cover; fail on it.
- name: Run the suite
run: |
set -o pipefail
pytest tests 2>&1 | tee pytest.log
if grep -q "COVERAGE GAP" pytest.log; then
echo "coverage gap: an optional module is missing"
exit 1
fi