chore: Add database config for CI
This commit is contained in:
parent
48c90db222
commit
59cd93ef66
2 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,10 @@
|
||||||
image: "elixir:1.10"
|
image: "elixir:1.10"
|
||||||
|
|
||||||
|
variables:
|
||||||
|
DATABASE_URL: "postgres"
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: postgres:12
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
script: script/cibuild
|
script: script/cibuild
|
|
@ -9,7 +9,7 @@ config :legendary, Legendary.Repo,
|
||||||
username: "postgres",
|
username: "postgres",
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
database: "legendary_test#{System.get_env("MIX_TEST_PARTITION")}",
|
database: "legendary_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||||
hostname: "localhost",
|
hostname: System.get_env("DATABASE_URL") || "localhost",
|
||||||
pool: Ecto.Adapters.SQL.Sandbox
|
pool: Ecto.Adapters.SQL.Sandbox
|
||||||
|
|
||||||
# We don't run a server during test. If one is required,
|
# We don't run a server during test. If one is required,
|
||||||
|
|
Loading…
Reference in a new issue