Skip to content

Commit

Permalink
CI: add conda based test suite (including Windows coverage) (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored Apr 1, 2022
1 parent b78e0a6 commit a807404
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/tests-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Conda Tests

on: [push, pull_request]

jobs:
test:
name: ${{ matrix.os }} (Python ${{ matrix.python }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python: ["3.9", "3.10"]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: ci/environment.yml
extra-specs: python=${{ matrix.python }}
cache-env: true

- 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
- name: Install pyogrio
run: pip install -e .

- name: Test
run: |
pytest -v -r s pyogrio/tests
9 changes: 9 additions & 0 deletions ci/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: test
channels:
- conda-forge
dependencies:
- numpy
- libgdal
- pytest
- pygeos
- geopandas-base

0 comments on commit a807404

Please sign in to comment.