From b7c134ab73f3fa6c64496485489134b7773f22df Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Tue, 9 May 2023 14:57:48 +0200 Subject: [PATCH] - add db to ci workflow --- .gitea/workflows/ci.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 0632bbd..5ae08e7 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -10,6 +10,19 @@ jobs: japa-tests: # run build on latest ubuntu runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_USER: ProjectName + POSTGRES_PASSWORD: password + POSTGRES_DB: ProjectName-test + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: # this will check out the current branch (https://github.com/actions/checkout#Push-a-commit-using-the-built-in-token) - name: Check out repository code @@ -36,6 +49,12 @@ jobs: - name: Run tests run: node ace test env: + DB_CONNECTION: pg + PG_HOST: postgres + PG_PORT: 5432 + PG_USER: ProjectName + PG_PASSWORD: password + PG_DB_NAME: ProjectName-test PORT: 3333 HOST: 0.0.0.0 APP_KEY: somefakekeythatis>16characters