Add CI workflow and a network test marker #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |