From fc40c0b2cd51922374dba075e14927e108b6e4a0 Mon Sep 17 00:00:00 2001 From: zera1ul <179273071+zera1ul@users.noreply.github.com> Date: Sun, 15 Sep 2024 15:16:23 +0200 Subject: [PATCH] Add automated tests --- .github/workflows/build.yml | 2 +- compose.test.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e0cf0e..3a5a304 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: npm run build - name: Start environment run: | - docker compose up -d + docker compose -f compose.test.yml up -d - name: Run test run: | npm run test diff --git a/compose.test.yml b/compose.test.yml index f9289d6..ab9376a 100644 --- a/compose.test.yml +++ b/compose.test.yml @@ -7,3 +7,7 @@ services: - 5432:5432 volumes: - ./mockup-data.sql:/docker-entrypoint-initdb.d/data.sql + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 1s + retries: 30