5

Run Postgres on GitHub Action

 2 years ago
source link: https://dannypsnl.github.io/blog/2021/07/16/cs/github-action-postgres/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

For some projects, like Phoenix project, we need a database for testing. Good news is setting it up is simple: This is all we need.Run Postgres on GitHub Action

Email: [email protected]
GitHub: @dannypsnl
Twitter: @dannypsnl

Programming Language Theory • System Programming

Run Postgres on GitHub Action

For some projects, like Phoenix project, we need a database for testing. Good news is setting it up is simple:

jobs:
  build:
    name: Build and test
    runs-on: ubuntu-latest
    services:
      postgres:
        image: postgres:11
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_DB: my_app_test
        ports:
          - 5432:5432
        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

This is all we need.

author: Lîm Tsú-thuàn/林子篆/Danny

category:cs

tag:github actionpostgres

Similar Articles

All works in this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
©2022 dannypsnl(林子篆)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK