Skip to content

Instantly share code, notes, and snippets.

@romikoops
Forked from lee-dohm/article-test.exs
Created May 28, 2018 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romikoops/015c3539a738f86d04a4b53f079e5a14 to your computer and use it in GitHub Desktop.
Save romikoops/015c3539a738f86d04a4b53f079e5a14 to your computer and use it in GitHub Desktop.
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