Skip to content

Fix tests for gdal 3.4 and 3.6 #1111

Fix tests for gdal 3.4 and 3.6

Fix tests for gdal 3.4 and 3.6 #1111

Workflow file for this run

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:
# 2018
- python: 3.7
os: ubuntu-20.04
numpy: numpy==1.15.*
display_name: "2018"
pins: "h5py==2.9.* sqlalchemy==1.4.1 shapely==2.0.* pyproj==3.0.*"
extras: "[test,gridadmin]"
# 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: "latest"
extras: "[test,gridadmin]"
# current
- python: '3.12'
os: ubuntu-latest
numpy: numpy==1.26.*
pins: ""
display_name: "latest"
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: 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