Giter Club home page Giter Club logo

setup-postgres's Introduction

setup-postgres

The missing action for Postgres ๐ŸŽ‰

  • Faster (with the default version) 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

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

Currently supports

Version 16 15 14 13 12 11 10 9.6
Ubuntu โœ“ โœ“ default โœ“ โœ“ โœ“ โœ“ โœ“
Mac โœ“ โœ“ default โœ“ โœ“ โœ“
Windows default

Test against multiple versions

    strategy:
      matrix:
        postgres-version: [16, 15, 14, 13, 12]
    steps:
      - uses: ankane/setup-postgres@v1
        with:
          postgres-version: ${{ matrix.postgres-version }}

Options

Create a database

      - uses: ankane/setup-postgres@v1
        with:
          database: testdb

Set postgresql.conf config

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

Install development files (for building extensions)

      - uses: ankane/setup-postgres@v1
        with:
          dev-files: true

Extra Steps

Run queries

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

Related Actions

Contributing

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

setup-postgres's People

Contributors

ankane avatar dpprdan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

setup-postgres's Issues

Ideas

Ideas

  • Add input for postgresql.conf - config: | shared_preload_libraries = 'pg_stat_statements'
  • Add database and user inputs
  • Add instructions for caching
  • Support latest version
  • Add input for pg_hba.conf - hba: | ... (naming based on file locations)

Postgres 14 available on mac via homebrew

From https://formulae.brew.sh/formula/postgresql I gather that Postgres 14 is available for mac via homebrew. Is it necessary to update https://github.com/ankane/setup-postgres/blob/v1/index.js accordingly?

In any case I am getting the following error when trying the default version (i.e. v13 currently) or v13 explicitly:

/bin/sh: /usr/local/opt/postgresql@13/bin/pg_ctl: No such file or directory

When explicitly requesting postgres-version: 14 it is already installed apparently.

User, password, host, port?

First of all, thank you for this action.

When one wants to connect to the DB created by this action, what's the username, password, host, and port for it? I think this would be useful to include in the documentation. Same for setup-mariadb, setup-mysql, and the other actions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.