Bump to version 2.1.3 #185
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python CI | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: | |
# At present, only 3.8 is supported. | |
- "3.8" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
# ubuntu-22.04 has the following postgres packages by default: | |
# postgresql-14/now 14.8-1.pgdg22.04+1 amd64 [installed,local] | |
# postgresql-client-14/now 14.8-1.pgdg22.04+1 amd64 [installed,local] | |
# postgresql-client-common/now 250.pgdg22.04+1 all [installed,local] | |
# postgresql-common/now 250.pgdg22.04+1 all [installed,local] | |
# | |
# postgresql-14-postgis-3 requires a different version, as installed | |
# below. However, the version required is periodically updated, and the | |
# previous version becomes unavailable. To discover what version is | |
# required, comment out the indicated line, read the error message, and | |
# update the installation as indicated. | |
run: | | |
sudo apt list --installed | grep postgres | |
sudo apt-get update | |
echo "downgrading postgresql-14" | |
# The version of postgresql-14 may periodically require updating. To find out what | |
# it must be upgraded to, comment out the following line and read the error message | |
# that results. For more info, see above. (This is a grim procedure.) | |
sudo apt-get install -yq --allow-downgrades postgresql-14=14.11-0ubuntu0.22.04.1 | |
echo "installing postgresql-14-postgis-3" | |
sudo apt-get install -yq postgresql-14-postgis-3 | |
echo "installing postgresql-plpython3-14" | |
sudo apt-get install -yq postgresql-plpython3-14 | |
# Install remaining dependencies | |
sudo apt-get install libhdf5-serial-dev libnetcdf-dev libspatialite-dev libgdal-dev | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
# Installing this project is tricky, due to its dependency on GDAL 3.0.4. | |
# For an explanation, see the README. | |
- name: Install project | |
run: | | |
# Pre-install initial packages (pip, setuptools, numpy) | |
poetry install --only initial | |
# Install gdal using pip3 into the Poetry virtualenv | |
poetry run pip3 install gdal==3.0.4 | |
# Install rest of project | |
poetry install --without black | |
- name: Test with pytest (full) | |
if: github.ref == 'refs/heads/master' | |
run: | | |
poetry run pytest -m "not online" -v --tb=short tests | |
- name: Test with pytest (fast) | |
if: github.ref != 'refs/heads/master' | |
run: | | |
poetry run pytest -m "not online and not slow" -v --tb=short tests |