diff --git a/test/test_helper.exs b/test/test_helper.exs index 3a05c78..4b8abf0 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -10,6 +10,8 @@ Application.put_env(:pinchflat, :http_client, HTTPClientMock) Mox.defmock(UserScriptRunnerMock, for: Pinchflat.Lifecycle.UserScripts.UserScriptCommandRunner) Application.put_env(:pinchflat, :user_script_runner, UserScriptRunnerMock) +if System.get_env("EX_CHECK"), do: Code.put_compiler_option(:warnings_as_errors, true) + ExUnit.start() Ecto.Adapters.SQL.Sandbox.mode(Pinchflat.Repo, :manual) Faker.start() diff --git a/tooling/.check.exs b/tooling/.check.exs index 98ca0e2..87b90ff 100644 --- a/tooling/.check.exs +++ b/tooling/.check.exs @@ -17,7 +17,8 @@ {:formatter, env: %{"MIX_ENV" => "test"}}, {:sobelow, "mix sobelow --config"}, {:prettier_formatting, "yarn run lint:check", fix: "yarn run lint:fix"}, - {:npm_test, false} + {:npm_test, false}, + {:ex_unit, env: %{"MIX_ENV" => "test", "EX_CHECK" => "1"}} ## curated tools may be disabled (e.g. the check for compilation warnings) # {:compiler, false},