chore: Add database config for CI

This commit is contained in:
Robert Prehn 2020-07-03 10:34:19 -05:00
parent 48c90db222
commit 59cd93ef66
2 changed files with 7 additions and 1 deletions

View file

@ -1,4 +1,10 @@
image: "elixir:1.10"
variables:
DATABASE_URL: "postgres"
services:
- name: postgres:12
tests:
script: script/cibuild

View file

@ -9,7 +9,7 @@ config :legendary, Legendary.Repo,
username: "postgres",
password: "postgres",
database: "legendary_test#{System.get_env("MIX_TEST_PARTITION")}",
hostname: "localhost",
hostname: System.get_env("DATABASE_URL") || "localhost",
pool: Ecto.Adapters.SQL.Sandbox
# We don't run a server during test. If one is required,