-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (104 loc) · 3.58 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
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
setuptools: setuptools==63.*
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
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]"
# 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 (still using 3.11 because 3.12 breaks; see issue 348)
- python: '3.12'
os: ubuntu-latest
setuptools: setuptools==69.*
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 wheel scikit-build
pip install ${{ matrix.setuptools }}
pip install ${{ matrix.numpy }}
pip install -v -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