-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (49 loc) · 1.43 KB
/
test.yml
File metadata and controls
51 lines (49 loc) · 1.43 KB
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
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
test:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13", "3.14"]
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Cache GDAL
uses: actions/cache@v4
id: cache-gdal
with:
path: |
/usr/lib/x86_64-linux-gnu/libgdal*
/usr/include/gdal*
/usr/bin/gdal*
key: gdal-ubuntu-latest
- name: Install GDAL
if: steps.cache-gdal.outputs.cache-hit != 'true'
run: |
sudo apt-get update
sudo apt-get install -y gdal-bin libgdal-dev
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --group test
pip install .
- name: Run tests
run: pytest -m "not slow" -n auto