fix: read PGHOST env var in test config for CI postgres hostname
Some checks failed
Elixir CI / Build and test (push) Failing after 2m53s
Elixir CI / Dialyzer (push) Failing after 5m27s
Elixir CI / Build and Push Docker Image (push) Has been skipped

CI sets PGHOST=postgres for the Docker service network, but test.exs
hardcoded hostname to localhost, causing connection refused errors.
This commit is contained in:
Graham McIntire 2026-07-27 13:19:59 -05:00
parent fe79561380
commit 0742308d10
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -22,7 +22,7 @@ config :aprsme, Aprsme.PromEx, disabled: true
config :aprsme, Aprsme.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
hostname: System.get_env("PGHOST", "localhost"),
database: "aprsme_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: pool_size,