test env uses ENV db conf
Some checks failed
ci / build (push) Has been cancelled
ci / Tests & Checks (push) Failing after 6m56s

This commit is contained in:
CJ_Clippy 2025-02-13 00:24:05 -08:00
parent be4a9a2534
commit 7adbe90b53
2 changed files with 5 additions and 14 deletions

View File

@ -127,7 +127,6 @@ jobs:
mix compile --warnings-as-errors mix compile --warnings-as-errors
working-directory: ./apps/bright working-directory: ./apps/bright
# @blocking @see https://github.com/nektos/act/issues/2529
- name: Unit tests - name: Unit tests
run: | run: |
mix test --only=unit mix test --only=unit

View File

@ -9,19 +9,11 @@ config :bcrypt_elixir, :log_rounds, 1
# to provide built-in test partitioning in CI environment. # to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information. # Run `mix help test` for more information.
config :bright, Bright.Repo, config :bright, Bright.Repo,
username: "postgres", database: System.get_env("DB_NAME", "bright"),
password: "password", hostname: System.get_env("DB_HOST", "db"),
# hostname: username: System.get_env("DB_USER", "postgres"),
# System.cmd("docker", [ password: System.get_env("DB_PASS", "password"),
# "inspect", # database: "bright_test#{System.get_env("MIX_TEST_PARTITION")}",
# "--format",
# "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}",
# "futureporn-db"
# ])
# |> elem(0)
# |> String.trim(),
hostname: "localhost",
database: "bright_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox, pool: Ecto.Adapters.SQL.Sandbox,
pool_size: System.schedulers_online() * 4 pool_size: System.schedulers_online() * 4