From ea92194719fc3d45ec59205e902a33c823701ee2 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Mon, 28 Dec 2020 12:35:01 -0600 Subject: [PATCH] Add PostgreSQL service to CI --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06c9a8d2..e7160525 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,18 @@ jobs: test: name: Test runs-on: ubuntu-latest + + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: secret + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - name: Set up Go 1.x @@ -23,3 +35,6 @@ jobs: - name: Test run: go test -v ./... + env: + PGHOST: postgres + PGPASSWORD: secret