Skip to content

nyurik/action-setup-postgis

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-postgres

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) to PATH.
  • Uses PostgreSQL installed in GitHub Actions Virtual Environments.
  • Installs the correct version of PostGIS and runs CREATE EXTENSION postgis in the new database.
  • [Easy to check][action.yml] that IT DOES NOT contain malicious code.

Usage

Key Value
URI postgresql://postgres:postgres@localhost/postgres
Host localhost
Port 5432
Username postgres
Password postgres
Database postgres
Rights --createdb
Cached-dir downloads

Basic

steps:
  - uses: nyurik/action-setup-postgis@v1

Advanced

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 }}

License

The scripts and documentation in this project are released under the MIT License.