Skip to content

jimsforks/setup-postgres

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-postgres

The missing action for Postgres 🎉

  • Faster and simpler than containers
  • Works on Linux, Mac, and Windows
  • Supports different versions

Build Status

Getting Started

Add it as a step to your workflow

    - uses: ankane/setup-postgres@v1

Versions

Specify a version (defaults to the latest)

    - uses: ankane/setup-postgres@v1
      with:
        postgres-version: 13

Currently supports 13, 12, 11, 10, and 9.6. Only the latest version is supported on Windows.

Test against multiple versions

    strategy:
      matrix:
        postgres-version: [13, 12, 11, 10, 9.6]
    steps:
    - uses: ankane/setup-postgres@v1
      with:
        postgres-version: ${{ matrix.postgres-version }}

Extra Steps

Create a database

    - run: createdb testdb

Run queries

    - run: psql -d testdb -c 'SHOW server_version'

Config

Set postgresql.conf config

    - uses: ankane/setup-postgres@v1
      with:
        config: |
          shared_preload_libraries = 'pg_stat_statements'

Related Actions

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

About

The missing action for Postgres

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%