Add script for cleaning for tests

This commit is contained in:
miffy 2019-09-08 01:51:18 +02:00
parent fa037fd683
commit 2e2dcc8208
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. # See the documentation for `Mix` for more info on aliases.
defp aliases do defp aliases do
[ [
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], "ecto.setup": [
"ecto.reset": ["ecto.drop", "ecto.setup"], "ecto.create",
test: ["ecto.create --quiet", "ecto.migrate", "test"], "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": [ "phx.deps_migrate_serve": [
"deps.get", "deps.get",
"ecto.create --quiet", "ecto.create --quiet",

3
script/clean_after_tests Executable file
View file

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