Skip to content

Merge pull request #401 from phargogh/bugfix/396-compatibility-with-n… #764

Merge pull request #401 from phargogh/bugfix/396-compatibility-with-n…

Merge pull request #401 from phargogh/bugfix/396-compatibility-with-n… #764

Workflow file for this run

name: Test PyGeoprocessing
on: [push, pull_request]
defaults:
run:
shell: bash -l {0}
jobs:
Test:
runs-on: ${{ matrix.os }}
name: Test (py${{ matrix.python-version }}, GDAL ${{ matrix.gdal }}, ${{ matrix.os }})
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
gdal: ["3.2.2", "3.3.0", "3.4.3", "3.5", "3.6", "3.7", "3.8"]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- gdal: "3.2.2"
python-version: 3.10
- gdal: "3.2.2"
python-version: 3.11
- gdal: "3.2.2"
python-version: 3.12
- gdal: "3.3.0"
python-version: 3.10
- gdal: "3.3.0"
python-version: 3.11
- gdal: "3.3.0"
python-version: 3.12
- gdal: "3.4.3"
python-version: 3.11
- gdal: "3.4.3"
python-version: 3.12
- gdal: "3.5"
python-version: 3.12
steps:
- uses: actions/checkout@v4
with:
# Fetch all history so that setuptool_scm can build the correct
# version string.
fetch-depth: 0
- name: setup-micromamba
uses: mamba-org/setup-micromamba@v1
with:
# Grab requirements from pip-compatible requirements.txt
environment-file: requirements.txt
condarc: |
channels:
- conda-forge
create-args: >-
python=${{ matrix.python-version }}
gdal=${{ matrix.gdal }}
setuptools
python-build
flake8
pytest
numpy
environment-name: pyenv
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127
# chars wide
flake8 . --count --exit-zero --max-complexity=10 \
--max-line-length=127 --statistics
- name: Build and Install PyGeoprocessing
run: |
python -m build --wheel --verbose
python -m pip install $(find dist -name "*.whl")
- name: Test with pytest
run: python -m pytest tests