add mix format to tests

This commit is contained in:
shibao 2022-01-22 14:54:19 -05:00 committed by oliviasculley
parent a72a4b0cbe
commit f0676a2433
2 changed files with 10 additions and 6 deletions

View File

@ -6,17 +6,16 @@ import Config
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :lokal, Lokal.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "lokal_test#{System.get_env("MIX_TEST_PARTITION")}",
url:
System.get_env("TEST_DATABASE_URL") ||
"ecto://postgres:postgres@localhost/lokal_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 10
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :lokal, LokalWeb.Endpoint,
http: [ip: {0, 0, 0, 1}, port: 4002],
http: [ip: {0, 0, 0, 0}, port: 4002],
secret_key_base: "T4DkRImgeMNCcPcTWBCZyKYp3KQ8yyPD33VT4wj6ogbP8fIGUsqmOTNX3clTMrLo",
server: false

View File

@ -68,7 +68,12 @@ defmodule Lokal.MixProject do
setup: ["deps.get", "compile", "ecto.setup", "cmd npm install --prefix assets"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
test: [
"format --check-formatted",
"ecto.create --quiet",
"ecto.migrate --quiet",
"test"
]
]
end
end