-
Notifications
You must be signed in to change notification settings - Fork 23
72 lines (64 loc) · 2.07 KB
/
tests-conda.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
name: Conda Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# cancel running jobs on new commit to PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.os }}, python ${{ matrix.python }}, ${{ matrix.env }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python: ["3.10", "3.11", "3.12"]
env: ["latest"]
include:
# environment with lower versions of optional dependencies
- python: "3.10"
extra: >-
pandas=1.5
geopandas=0.12
# minimal environment without optional dependencies
- os: "ubuntu-latest"
python: "3.9"
env: "minimal"
# environment for older Windows libgdal to make sure gdal_i.lib is
# properly detected
- os: "windows-2019"
python: "3.10"
env: "libgdal3.5.1"
# environment with nightly wheels
- os: "ubuntu-latest"
python: "3.11"
env: "nightly-deps"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/envs/${{ matrix.env }}.yml
create-args: >-
python=${{ matrix.python }}
${{ matrix.extra }}
- name: Set environment variables (Windows)
if: runner.os == 'Windows'
run: |
echo "GDAL_INCLUDE_PATH=$MAMBA_ROOT_PREFIX/envs/test/Library/include." >> $GITHUB_ENV
echo "GDAL_LIBRARY_PATH=$MAMBA_ROOT_PREFIX/envs/test/Library/lib" >> $GITHUB_ENV
echo "GDAL_VERSION=$(gdalinfo --version | cut -c 6-10)" >> $GITHUB_ENV
- name: Install pyogrio
run: pip install -e .
- name: Test
run: |
pytest -v --color=yes -r s pyogrio/tests