Skip to content

Commit

Permalink
tests: use LOG_LEVEL or default to info
Browse files Browse the repository at this point in the history
  • Loading branch information
evnu committed Oct 20, 2023
1 parent 51613d8 commit c72d232
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule PropCheck.Mixfile do
aliases: aliases(),
preferred_cli_env: [
tests: :test,
test_ext: :test,
external_tests: :test,
parallel_test: :test,
test_parallel: :test
],
Expand Down Expand Up @@ -72,10 +72,10 @@ defmodule PropCheck.Mixfile do
def aliases do
[
clean: ["clean", "propcheck.clean"],
test_ext: &external_tests/1,
external_tests: &external_tests/1,
parallel_test: ["test --include concurrency_test --only concurrency_test"],
test_parallel: ["test --include concurrency_test --only concurrency_test"],
tests: ["test_ext", "test"],
tests: [&loglevel/1, "external_tests", "test"],
lint: [
"credo --strict",
"hex.audit"
Expand All @@ -92,6 +92,11 @@ defmodule PropCheck.Mixfile do
]
end

defp loglevel(_args) do
log_level = System.get_env("LOG_LEVEL", "info") |> String.to_atom()
Logger.configure(level: log_level)
end

defp external_tests(_args) do
run = fn arg ->
r = Mix.shell().cmd(arg)
Expand Down

0 comments on commit c72d232

Please sign in to comment.