From b5a2f88f493c85ed01ae7a5a639249a9f5dbd6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=ADcaro=20Jos=C3=A9=20Barbosa=20Soares?= <57676255+Josehpequeno@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:17:05 -0300 Subject: [PATCH] Update go.yml --- .github/workflows/go.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0b443f3..0f466bf 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,6 +13,17 @@ jobs: build: runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_DB: documentmanager + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + steps: - uses: actions/checkout@v4 @@ -21,6 +32,15 @@ jobs: with: go-version: '1.20' + - name: Export variables + run: | + export DB_HOST=localhost && + export DB_PORT=5432 && + export DB_USER=postgres && + export DB_PASSWORD=postgres && + export DB_NAME=documentmanager && + export API_SECRET=tESTsecret + - name: Build run: go build -v ./...