Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample files for blog post "Simpler Elixir Travis Configuration" ... http://www.lee-dohm.com/2017/12/24/simpler-elixir-travis-configuration/
use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :hello_phoenix, HelloPhoenix.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :hello_phoenix, HelloPhoenix.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "hello_phoenix_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :hello_phoenix, HelloPhoenix.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :hello_phoenix, HelloPhoenix.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "",
database: "hello_phoenix_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
use Mix.Config
config :hello_phoenix, HelloPhoenix.Repo,
password: ""
use Mix.config
# Other configuration goes here
import_config "#{Mix.env}.exs"
use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :hello_phoenix, HelloPhoenix.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configure your database
config :hello_phoenix, HelloPhoenix.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "hello_phoenix_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
# Customize the test environment for CI systems
if System.get_env("CI") == "true", do: import_config "ci.exs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment