Fix cleaning upload files after running tests
See https://elixirforum.com/t/running-code-after-all-exunit-tests-are-done/9937/6 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
8f50e88e1e
commit
60707b8f8d
8
mix.exs
8
mix.exs
@ -132,8 +132,7 @@ defmodule Mobilizon.Mixfile do
|
||||
test: [
|
||||
"ecto.create --quiet",
|
||||
"ecto.migrate",
|
||||
"test",
|
||||
"cmd ./script/clean_after_tests"
|
||||
&run_test/1
|
||||
],
|
||||
"phx.deps_migrate_serve": [
|
||||
"deps.get",
|
||||
@ -145,6 +144,11 @@ defmodule Mobilizon.Mixfile do
|
||||
]
|
||||
end
|
||||
|
||||
defp run_test(args) do
|
||||
Mix.Task.run("test", args)
|
||||
File.rm_rf!("test/uploads")
|
||||
end
|
||||
|
||||
defp docs() do
|
||||
[
|
||||
source_ref: "v#{@version}",
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf test/uploads
|
Loading…
Reference in New Issue
Block a user