fix ci env

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-01-13 23:40:06 +01:00
parent b763014ad3
commit 97c1c4e2a3
2 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,9 @@ image: elixir:latest
services:
- postgres:latest
variables:
MIX_ENV: "test"
before_script:
- mix local.rebar --force
- mix local.hex --force

View File

@ -15,9 +15,9 @@ config :logger,
# Configure your database
config :eventos, Eventos.Repo,
adapter: Ecto.Adapters.Postgres,
username: "elixir",
password: "elixir",
username: if(System.get_env("CI"), do: "postgres", else: "elixir"),
password: if(System.get_env("CI"), do: "", else: "elixir"),
database: "eventos_test",
hostname: "localhost",
hostname: if(System.get_env("CI"), do: "postgres", else: "localhost"),
pool: Ecto.Adapters.SQL.Sandbox,
types: Eventos.PostgresTypes