From 6013b00c633a6ea5bf3da489ab83df20c8c469b7 Mon Sep 17 00:00:00 2001 From: dzgierski19 Date: Thu, 6 Jun 2024 13:34:24 +0200 Subject: [PATCH] created job for migrating db and setting empty db --- .github/workflows/jobs.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/jobs.yml b/.github/workflows/jobs.yml index 61d2d2e..dd1bf5c 100644 --- a/.github/workflows/jobs.yml +++ b/.github/workflows/jobs.yml @@ -5,6 +5,21 @@ on: - dev jobs: + # services: + # postgres: + # image: postgres:latest + # ports: + # - 5432:5432 + # env: + # POSTGRES_DB: testdb + # POSTGRES_USER: testuser + # POSTGRES_PASSWORD: testpassword + # options: >- + # --health-cmd="pg_isready -U $${POSTGRES_USER}" + # --health-interval=10s + # --health-timeout=5s + # --health-retries=5 + build: runs-on: ${{ matrix.os }} @@ -27,5 +42,10 @@ jobs: - name: Run unit tests run: npm run test + - name: Run database migrations + run: npm run migrations + - name: Run e2e tests run: npm run test:e2e + env: + DATABASE_URL: postgres://testuser:testpassword@localhost:5432/testdb