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: [
|
test: [
|
||||||
"ecto.create --quiet",
|
"ecto.create --quiet",
|
||||||
"ecto.migrate",
|
"ecto.migrate",
|
||||||
"test",
|
&run_test/1
|
||||||
"cmd ./script/clean_after_tests"
|
|
||||||
],
|
],
|
||||||
"phx.deps_migrate_serve": [
|
"phx.deps_migrate_serve": [
|
||||||
"deps.get",
|
"deps.get",
|
||||||
@ -145,6 +144,11 @@ defmodule Mobilizon.Mixfile do
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp run_test(args) do
|
||||||
|
Mix.Task.run("test", args)
|
||||||
|
File.rm_rf!("test/uploads")
|
||||||
|
end
|
||||||
|
|
||||||
defp docs() do
|
defp docs() do
|
||||||
[
|
[
|
||||||
source_ref: "v#{@version}",
|
source_ref: "v#{@version}",
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
rm -rf test/uploads
|
|
Loading…
Reference in New Issue
Block a user