From 83d2a6ee5635ab84560a65f874ef4c693232412d Mon Sep 17 00:00:00 2001 From: Michal Warda Date: Sat, 17 Feb 2024 14:01:47 +0100 Subject: [PATCH] Add host auth method --- .github/workflows/api-test.yml | 3 ++- apps/api/config/test.exs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/api-test.yml b/.github/workflows/api-test.yml index eeb652030..8d304f745 100644 --- a/.github/workflows/api-test.yml +++ b/.github/workflows/api-test.yml @@ -26,6 +26,7 @@ jobs: ports: - 5432:5432 env: + POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -62,6 +63,6 @@ jobs: - run: mix test env: POSTGRES_HOST: postgres + POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres - POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} diff --git a/apps/api/config/test.exs b/apps/api/config/test.exs index 14f2e1704..6b230069c 100644 --- a/apps/api/config/test.exs +++ b/apps/api/config/test.exs @@ -13,7 +13,7 @@ config :buildel, Buildel.Repo, password: System.get_env("POSTGRES_PASSWORD", "postgres"), hostname: System.get_env("POSTGRES_HOST", "localhost"), database: "buildel_test#{System.get_env("MIX_TEST_PARTITION")}", - port: System.get_env("POSTGRES_PORT", "54321"), + port: String.to_integer(System.get_env("POSTGRES_PORT", "54321")), pool: Ecto.Adapters.SQL.Sandbox, pool_size: 10