From 1ac600e6c4b462f3f5d35b04e200cd4d872e3e0f Mon Sep 17 00:00:00 2001 From: shishantbiswas Date: Fri, 25 Sep 2026 13:18:17 +0000 Subject: [PATCH 1/3] Update .github/workflows/test.yml --- .github/workflows/test.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9f51ee5..4ebf4386 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,20 +9,20 @@ jobs: test: runs-on: ubuntu-latest - services: - postgres: - image: postgres:17 - env: - POSTGRES_PASSWORD: postgres - POSTGRES_USER: postgres - POSTGRES_DB: bknd - ports: - - 5430:5432 - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 + # services: + # postgres: + # image: postgres:17 + # env: + # POSTGRES_PASSWORD: postgres + # POSTGRES_USER: postgres + # POSTGRES_DB: bknd + # ports: + # - 5430:5432 + # options: >- + # --health-cmd pg_isready + # --health-interval 10s + # --health-timeout 5s + # --health-retries 5 steps: - uses: actions/checkout@v4 -- 2.54.0 From 9e72a5b93b3bf6fea0a1b49431f2b58e853833fa Mon Sep 17 00:00:00 2001 From: shishantbiswas Date: Fri, 25 Sep 2026 13:20:24 +0000 Subject: [PATCH 2/3] Update .github/workflows/test.yml --- .github/workflows/test.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ebf4386..1b30ca61 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,20 +9,20 @@ jobs: test: runs-on: ubuntu-latest - # services: - # postgres: - # image: postgres:17 - # env: - # POSTGRES_PASSWORD: postgres - # POSTGRES_USER: postgres - # POSTGRES_DB: bknd - # ports: - # - 5430:5432 - # options: >- - # --health-cmd pg_isready - # --health-interval 10s - # --health-timeout 5s - # --health-retries 5 + services: + postgres: + image: postgres:17 + env: + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + POSTGRES_DB: bknd + # ports: + # - 5430:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - uses: actions/checkout@v4 -- 2.54.0 From 9be8d058f1aa92ac46f30c7382a89fd86db16755 Mon Sep 17 00:00:00 2001 From: shishantbiswas Date: Fri, 25 Sep 2026 13:23:44 +0000 Subject: [PATCH 3/3] Update app/__test__/data/postgres.test.ts --- app/__test__/data/postgres.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/__test__/data/postgres.test.ts b/app/__test__/data/postgres.test.ts index 1560204d..6568450f 100644 --- a/app/__test__/data/postgres.test.ts +++ b/app/__test__/data/postgres.test.ts @@ -8,9 +8,11 @@ import { $ } from "bun"; import { connectionTestSuite } from "data/connection/connection-test-suite"; import { bunTestRunner } from "adapter/bun/test"; +const isCI = !!(process.env.GITEA_ACTIONS || process.env.GITHUB_ACTIONS); + const credentials = { - host: "localhost", - port: 5430, + host: isCI ? "postgres" : "localhost", + port: 5432, user: "postgres", password: "postgres", database: "bknd", @@ -39,6 +41,11 @@ async function isPostgresRunning() { describe("postgres", () => { beforeAll(async () => { + if (process.env.GITEA_ACTIONS || process.env.GITHUB_ACTIONS) { + console.log("Running in CI: Skipping manual docker run"); + return; + } + if (!(await isPostgresRunning())) { await $`docker run --rm --name bknd-test-postgres -d -e POSTGRES_PASSWORD=${credentials.password} -e POSTGRES_USER=${credentials.user} -e POSTGRES_DB=${credentials.database} -p ${credentials.port}:5432 postgres:17`; await $waitUntil("Postgres is running", isPostgresRunning); -- 2.54.0