test env uses ENV db conf
This commit is contained in:
parent
be4a9a2534
commit
7adbe90b53
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user