diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4497ae..2f52376 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,13 +71,12 @@ jobs: run: mix compile --warnings-as-errors if: ${{ matrix.lint }} + # We always need to run tests because code coverage forces us to skip some + # tests, so better to run normal tests on the whole matrix and the coverage + # only on the latest version. - name: Run tests - run: | - if [ -z "${{ matrix.coverage }}" ]; then - echo "Running tests without coverage." - mix test - else - echo "Running tests with coverage." - mix test - # mix coveralls.html - fi + run: mix test + + - name: Run tests with coverage + if: ${{ matrix.coverage }} + run: mix coveralls.github --exclude fails_on_coverage diff --git a/test/cluster_test.exs b/test/cluster_test.exs index e221e75..1984aae 100644 --- a/test/cluster_test.exs +++ b/test/cluster_test.exs @@ -10,6 +10,9 @@ if otp_release >= 25 do use ExUnit.Case import Mox + # These tests don't work if code coverage is enabled. + @moduletag :fails_on_coverage + setup_all do Task.start_link(fn -> System.cmd("epmd", [])