Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-01-14 00:21:20 +01:00
parent d16d6d07d8
commit 16c180d512
2 changed files with 7 additions and 7 deletions

View file

@ -6,9 +6,9 @@ services:
variables:
MIX_ENV: "test"
POSTGRES_DB: eventos_test
POSTGRES_USER: ci
POSTGRES_PASSWORD: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
POSTGRES_HOST: postgres
cache:
key: "$CI_JOB_NAME"
@ -19,7 +19,7 @@ cache:
before_script:
- apt-get update
- apt-get install -y postgresql-client
- apt-get install -y build-essential postgresql-client git
- mix local.rebar --force
- mix local.hex --force
- mix deps.get

View file

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