diff --git a/app/__test__/data/postgres.test.ts b/app/__test__/data/postgres.test.ts index a54b20bb..c8e37643 100644 --- a/app/__test__/data/postgres.test.ts +++ b/app/__test__/data/postgres.test.ts @@ -8,8 +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", + // Changes to "postgres" inside CI to talk directly to the Gitea service container + host: isCI ? "postgres" : "localhost", port: 5432, user: "postgres", password: "postgres",