Running code after all ExUnit tests are done

Faces with the same problem, the reason is that arguments apply to the last task in the list, and I solved it this way:

test: [..., &run_test/1]
...

defp run_test(args) do
  Mix.Task.run("test", args)
  ... # after test
end
3 Likes