This action sets up a PostgreSQL server with PostGIS extension. The code is based on the ikalnytskyi/action-setup-postgres action.
- Runs on Linux, macOS and Windows runners.
- Adds PostgreSQL binaries (e.g.
psql
) toPATH
. - Uses PostgreSQL installed in GitHub Actions Virtual Environments.
- Installs the correct version of PostGIS and runs
CREATE EXTENSION postgis
in the new database.- Linux version is installed from the PostGIS apt repository.
- Windows version is installed from the OSGeo.
- MacOS version is installed using Homebrew package.
- [Easy to check][action.yml] that IT DOES NOT contain malicious code.
Key | Value |
---|---|
URI | postgresql://postgres:postgres@localhost/postgres |
Host | localhost |
Port | 5432 |
Username | postgres |
Password | postgres |
Database | postgres |
Rights | --createdb |
Cached-dir | downloads |
steps:
- uses: nyurik/action-setup-postgis@v1
steps:
- uses: nyurik/action-setup-postgis@v1
with:
username: ci
password: sw0rdfish
database: test
port: 34837
id: pg
- run: pytest -vv tests/
env:
DATABASE_URI: ${{ steps.pg.outputs.connection-uri }}
The scripts and documentation in this project are released under the MIT License.