Fix tests for gdal 3.4 and 3.6 #1131
Workflow file for this run
This file contains 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: Linux | |
# Run on PR requests. And on master itself. | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
TestLinux: | |
name: Python ${{ matrix.python }} ${{ matrix.display_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# 2019 | |
- python: 3.8 | |
os: ubuntu-20.04 | |
numpy: numpy==1.17.* | |
display_name: "2019" | |
pins: "h5py==2.10.* sqlalchemy==1.4.10 shapely==2.0.* pyproj==3.0.*" | |
extras: "[test,gridadmin]" | |
# 2020 | |
- python: 3.9 | |
os: ubuntu-20.04 | |
numpy: numpy==1.19.* | |
display_name: "2020" | |
pins: "h5py==3.1.* sqlalchemy==1.4.20 shapely==2.0.* pyproj==3.0.*" | |
extras: "[test,gridadmin]" | |
# 2021 | |
- python: 3.9 | |
os: ubuntu-20.04 | |
numpy: numpy==1.21.* | |
display_name: "2021" | |
pins: "h5py==3.3.* sqlalchemy==1.4.30 shapely==2.0.* pyproj==3.2.*" | |
extras: "[test,gridadmin]" | |
# 2022 | |
- python: '3.10' | |
os: ubuntu-22.04 | |
numpy: numpy==1.23.* | |
display_name: "2022" | |
pins: "h5py==3.7.* sqlalchemy==1.4.40 shapely==2.0.* pyproj==3.4.*" | |
extras: "[test,gridadmin]" | |
# 2023 | |
- python: '3.11' | |
os: ubuntu-22.04 | |
numpy: numpy==1.24.* | |
pins: "h5py==3.10.* sqlalchemy==2.0.* shapely==2.0.* pyproj==3.6.*" | |
display_name: "2023" | |
extras: "[test,gridadmin]" | |
# current (still using 3.11 because 3.12 breaks; see issue 348) | |
- python: '3.11' | |
os: ubuntu-latest | |
numpy: numpy==1.24.* | |
pins: "" | |
display_name: "latest" | |
extras: "[test,gridadmin]" | |
- python: '3.11' | |
os: ubuntu-latest | |
numpy: numpy==1.24.* | |
pins: "" | |
display_name: "GDAL36" | |
extras: "[test,gridadmin]" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Add PPA | |
run: | | |
sudo add-apt-repository "ppa:ubuntugis/ppa" -y && sudo apt update | |
apt show libgdal-dev | grep Version | |
if: matrix.display_name == 'GDAL36' | |
- name: Install GDAL, sqlite3 and spatialite | |
run: | | |
sudo apt-get update && sudo apt-get install --yes --no-install-recommends libgdal-dev sqlite3 libsqlite3-mod-spatialite | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ matrix.numpy }}-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python }}-${{ matrix.numpy }}- | |
- name: Install python dependencies | |
shell: bash | |
run: | | |
pip install --disable-pip-version-check --upgrade pip setuptools==63.* wheel scikit-build | |
pip install ${{ matrix.numpy }} | |
pip install -e .${{ matrix.extras }} --no-build-isolation ${{ matrix.pins }} "pygdal==$(gdal-config --version).*" | |
pip list | |
- name: Run unittests | |
shell: bash | |
run: | | |
pytest | |
- name: Run integration tests | |
shell: bash | |
run: | | |
pytest integration_tests |