Skip to content

Merge pull request #148 from o2r-project/nuest-patch-1 #153

Merge pull request #148 from o2r-project/nuest-patch-1

Merge pull request #148 from o2r-project/nuest-patch-1 #153

Workflow file for this run

name: Python package tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-20.04, macos-10.15] # , windows-2019]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get install -y libproj-dev libgeos-dev libspatialite-dev libgdal-dev gdal-bin netcdf-bin
gdal-config --version
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install pkg-config gdal proj geos
gdal-config --version
- name: Install system dependencies (Windows)
if: runner.os == 'Windows'
run: |
nuget install GDAL -Version 2.4.4
- name: Install pygdal Python package (Ubuntu)
if: runner.os == 'Linux'
# see https://stackoverflow.com/a/17311033
run: |
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install pygdal=="`gdal-config --version`.*"
- name: Install pygdal Python package (macOS)
if: runner.os == 'macOS'
run: |
pip install pygdal=="`gdal-config --version`.*"
- name: Install pygdal Python package (Windows)
# https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries#Windows
if: runner.os == 'Windows'
run: |
pip install pygdal=="2.4.4.*"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install geoextent
run: |
pip install -e .
- name: Test with pytest
run: |
pip install -r requirements-dev.txt
pytest