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: services:
- postgres:latest - postgres:latest
variables:
MIX_ENV: "test"
before_script: before_script:
- mix local.rebar --force - mix local.rebar --force
- mix local.hex --force - mix local.hex --force

View File

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