|
|
|
|
@ -78,7 +78,6 @@ defmodule GcIndexRelay.MixProject do
@@ -78,7 +78,6 @@ defmodule GcIndexRelay.MixProject do
|
|
|
|
|
setup: ["deps.get", "ecto.setup"], |
|
|
|
|
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], |
|
|
|
|
"ecto.reset": ["ecto.drop", "ecto.setup"], |
|
|
|
|
test: test_alias(), |
|
|
|
|
"test.unit": ["test --only unit"], |
|
|
|
|
"test.integration": [ |
|
|
|
|
"ecto.create --quiet", |
|
|
|
|
@ -89,19 +88,9 @@ defmodule GcIndexRelay.MixProject do
@@ -89,19 +88,9 @@ defmodule GcIndexRelay.MixProject do
|
|
|
|
|
"compile --warnings-as-errors", |
|
|
|
|
"deps.unlock --unused", |
|
|
|
|
"format", |
|
|
|
|
"test.integration" |
|
|
|
|
"credo", |
|
|
|
|
"test.unit" |
|
|
|
|
] |
|
|
|
|
] |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
# Conditionally set up database for tests |
|
|
|
|
# Set REQUIRE_DB=true to run database migrations before tests |
|
|
|
|
# Or use mix test.integration for integration tests with database |
|
|
|
|
defp test_alias do |
|
|
|
|
if System.get_env("REQUIRE_DB") == "true" do |
|
|
|
|
["test.integration"] |
|
|
|
|
else |
|
|
|
|
["test"] |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|