From 7ef6070fb7e33fcab96fe2fd12d3236a19c5fbb3 Mon Sep 17 00:00:00 2001 From: prosenjitjoy Date: Mon, 11 Sep 2023 03:07:24 +0600 Subject: [PATCH] added postgres service --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d6245a..580f0ed 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_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: bankdb + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - uses: actions/checkout@v3 @@ -18,6 +30,7 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20' - + - name: Run migrations + run: make migrate_up - name: Test run: make run_test