Add script for cleaning for tests

This commit is contained in:
miffy 2019-09-08 01:51:18 +02:00
parent 46bb816a23
commit f78032495c
2 changed files with 18 additions and 3 deletions

18
mix.exs
View File

@ -120,9 +120,21 @@ defmodule Mobilizon.Mixfile do
# See the documentation for `Mix` for more info on aliases.
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"],
"ecto.setup": [
"ecto.create",
"ecto.migrate",
"run priv/repo/seeds.exs"
],
"ecto.reset": [
"ecto.drop",
"ecto.setup"
],
test: [
"ecto.create --quiet",
"ecto.migrate",
"test",
"cmd ./script/clean_after_tests"
],
"phx.deps_migrate_serve": [
"deps.get",
"ecto.create --quiet",

3
script/clean_after_tests Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
rm -rf test/uploads