From f78032495c03296d564424408507fffbd9c33f91 Mon Sep 17 00:00:00 2001 From: miffy Date: Sun, 8 Sep 2019 01:51:18 +0200 Subject: [PATCH] Add script for cleaning for tests --- mix.exs | 18 +++++++++++++++--- script/clean_after_tests | 3 +++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 script/clean_after_tests diff --git a/mix.exs b/mix.exs index 40eb97754..311f0b954 100644 --- a/mix.exs +++ b/mix.exs @@ -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", diff --git a/script/clean_after_tests b/script/clean_after_tests new file mode 100755 index 000000000..7344216e4 --- /dev/null +++ b/script/clean_after_tests @@ -0,0 +1,3 @@ +#!/bin/bash + +rm -rf test/uploads