-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (120 loc) · 4.13 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
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
setuptools: setuptools==63.*
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
setuptools: setuptools==63.*
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
setuptools: setuptools==63.*
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
setuptools: setuptools==63.*
numpy: numpy==1.23.*
display_name: "2022"
pins: "h5py==3.7.* sqlalchemy==1.4.40 shapely==2.0.* pyproj==3.4.*"
extras: "[test,gridadmin]"
- python: '3.10'
os: ubuntu-22.04
setuptools: setuptools==63.*
numpy: numpy==2.0.1
pins: ""
display_name: "2022 - numpy 2"
extras: "[test,gridadmin]"
# 2023
- python: '3.11'
os: ubuntu-22.04
setuptools: setuptools==63.*
numpy: numpy==1.24.*
pins: "h5py==3.10.* sqlalchemy==2.0.* shapely==2.0.* pyproj==3.6.*"
display_name: "2023"
extras: "[test,gridadmin]"
# current (using ubuntu 22.04 because latest will change to 24.04 with gdal 3.8 at some moment)
- python: '3.12'
os: ubuntu-22.04
setuptools: setuptools==69.*
numpy: numpy==1.26.*
pins: ""
display_name: "latest"
extras: "[test,gridadmin]"
- python: '3.12'
os: ubuntu-22.04
setuptools: setuptools==69.*
numpy: numpy==1.26.*
pins: ""
display_name: "latest - gdal 3.6"
extras: "[test,gridadmin]"
use_gdal_36: true
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.use_gdal_36
- 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 wheel scikit-build
pip install ${{ matrix.setuptools }}
pip install ${{ matrix.numpy }}
pip install -e .${{matrix.extras }} --no-build-isolation ${{ matrix.pins }} "pygdal==$(gdal-config --version).*"
pip list
- name: run setup.py for python 3.12
if: matrix.python == '3.12'
run: |
python setup.py develop
- name: Run unittests
shell: bash
run: |
pytest
- name: Run integration tests
shell: bash
run: |
pytest integration_tests