Skip to content

Commit

Permalink
CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
msp committed Jul 28, 2017
1 parent b7a092b commit 4a3aa9a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -56,4 +56,3 @@ elm-stuff
apps/cyanometer/latest.dump

dev.secret.exs
test.secret.exs
5 changes: 1 addition & 4 deletions app.json
Expand Up @@ -13,9 +13,6 @@
"generator": "secret"
}
},
"scripts": {
"postdeploy": "MIX_ENV=test mix ecto.migrate"
},
"buildpacks": [
{ "url": "https://github.com/HashNuke/heroku-buildpack-elixir.git" },
{ "url": "https://github.com/gjaldon/heroku-buildpack-phoenix-static.git" }
Expand All @@ -24,7 +21,7 @@
"environments": {
"test": {
"scripts": {
"test": "MIX_ENV=test mix test"
"test": "MIX_ENV=test mix test-ci"
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions apps/cyanometer/config/test.exs
Expand Up @@ -14,7 +14,8 @@ config :logger, level: :warn
# Configure your database
config :cyanometer, Cyanometer.Repo,
adapter: Ecto.Adapters.Postgres,
username: "cyan-test",
database: "cyanometer_test",
hostname: "localhost",
url: System.get_env("DATABASE_URL"),
# username: "cyan-test",
# database: "cyanometer_test",
# hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
3 changes: 2 additions & 1 deletion apps/cyanometer/mix.exs
Expand Up @@ -59,6 +59,7 @@ defmodule Cyanometer.Mixfile do
defp aliases do
["ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
"test": ["ecto.create --quiet", "ecto.migrate", "test"]]
"test": ["ecto.create --quiet", "ecto.migrate", "test"],
"test-ci": ["ecto.migrate", "test"]]
end
end
5 changes: 5 additions & 0 deletions apps/measurements/config/test.secret.exs
@@ -0,0 +1,5 @@
use Mix.Config

config :measurements,
wro_user: System.get_env("WRO_USER"),
wro_pswd: System.get_env("WRO_PSWD")
5 changes: 5 additions & 0 deletions apps/measurements/mix.exs
Expand Up @@ -11,6 +11,7 @@ defmodule Measurements.Mixfile do
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
aliases: aliases(),
deps: deps()]
end

Expand Down Expand Up @@ -40,4 +41,8 @@ defmodule Measurements.Mixfile do
[{:httpoison, "~> 0.12"},
{:bypass, "~> 0.8", only: :test}]
end

defp aliases do
["test-ci": ["ecto.migrate", "test"]]
end
end
5 changes: 5 additions & 0 deletions mix.exs
Expand Up @@ -5,6 +5,7 @@ defmodule CyanometerUmbrella.Mixfile do
[apps_path: "apps",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
aliases: aliases(),
deps: deps()]
end

Expand All @@ -23,4 +24,8 @@ defmodule CyanometerUmbrella.Mixfile do
defp deps do
[]
end

defp aliases do
["test-ci": ["ecto.migrate", "test"]]
end
end

0 comments on commit 4a3aa9a

Please sign in to comment.