There is a GitHub action that runs the test suite across three PostGIS Docker images. See workflow.
When this was introduced Natalia noted the images differ and give coverage across different GeoSpatial libraries. From the commit message at the time:
For example, at the time of this branch:
* latest stable in debian:
* POSTGIS="3.5.2 dea6d0a"
* GEOS="3.9.0-CAPI-1.16.2"
* PROJ="7.2.1"
* latest stable in alpine:
* POSTGIS="3.5.3 0"
* GEOS="3.13.1-CAPI-1.19.2"
* PROJ="9.6.0
* latest development branch:
* POSTGIS="3.6.0dev 3.6.0beta1-29-g7c8cfe07d"
* GEOS="3.14.0beta2-CAPI-1.20.1"
* PROJ="9.7.0"
The current matrix is ālatestā, ā18-3.6-alpineā and ā17-masterā. In addition we run PostGIS over on djangoci.com
In table format this currently gives:
| Environment | OS | PostgreSQL | PostGIS | GDAL | GEOS | PROJ |
|---|---|---|---|---|---|---|
| pull-requests-noble | Ubuntu 24.04 | 15 | 3.6 | 3.8.4 | 3.12.1 | 9.4.0 |
| latest | Debian 11 | 17 | 3.5.2 | 3.2 | 3.9 | 7.2 |
| 18-3.6-alpine | Alpine 3.22 | 18 | 3.6.1 | 3.10 | 3.13 | 9.6 |
| 17-master | Debian 11 | 17 | dev | 3.13dev | 3.15dev | 9.8 |
PostGIS docker hub - postgis/postgis - Docker Image
Currently the workflow is based upon Ubuntu and uses the PostGIS image for the database service. This means we get good coverage of multiple Postgres databases versions, PostGIS and geospatial libraries. However, those differing versions are only installed in the database service. The GIS tests that test the Python bindings with the C libraries are all using the versions of the packages available with Ubuntu 24.04.
This means, when I added a test which required a more modern version of GDAL in one of my PRs this week the CI passed even though it contained a typo.
Iād like to propose we alter the PostGIS workflow to run the test suite in those images as well as providing the database service. The aim is to enhance test coverage against multiple versions of geospatial libraries.
I propose the following matrix.
| Environment | OS | PostgreSQL | PostGIS | GDAL | GEOS | PROJ | Source |
|---|---|---|---|---|---|---|---|
| pull-requests-noble | Ubuntu 24.04 | 15 | 3.6 | 3.8.4 | 3.12.1 | 9.4.0 | |
| 16-3.5-alpine | Alpine 3.22 | 16 | 3.5.4 | 3.10 | 3.13 | 9.6 | |
| 18-3.6-alpine | Alpine 3.22 | 18 | 3.6.1 | 3.10 | 3.13 | 9.6 | |
| 17-master | Debian 11 | 17 | dev | 3.13dev | 3.15dev | 9.8 |
This change proposes to:
- Remove the ālatestā image. That contains GDAL 3.2 which Django has now dropped support for.
- Add an image to test against PostgreSQL 16. This gives additional coverage of PostgreSQL and PostGIS versions.
If there is support, I would then like to continue work on moving the test suite to being run inside of these containers. Current work in progress is here. I have managed to get the 17-master image close to working (one minor test fail) with a few fails on the Alpine image related to the JPEG OGR driver.