mix_machine
mix_machine copied to clipboard
Unable to use --warnings-as-errors to fail CI on compilation warnings
I'm having trouble getting mix_machine to work how I'd expect it to. I want to use mix_machine in CI and have it cause CI to fail if there's a compilation warning. But if I use mix compile.machine --warnings-as-errors
and there's a compilation warning then the sarif report doesn't get generated. And if I don't use --warnings-as-errors
then CI doesn't fail. However when not in the CI environment (GitHub actions) mix compile.machine --warnings-as-errors
does generate a report.
I'm testing with:
- Latest test run: https://github.com/axelson/password-validator/runs/4864051925?check_suite_focus=true
- Project code: https://github.com/axelson/password-validator/pull/22
- mix_machine code: https://github.com/axelson/mix_machine/blob/debug/lib/mix/tasks/compile.machine.ex#L60
It looks like the Mix.Task.run("compile", argv)
never returns