diff --git a/.github/workflows/elixir-ci.yml b/.github/workflows/elixir-ci.yml index b42aac3..fc0e5af 100644 --- a/.github/workflows/elixir-ci.yml +++ b/.github/workflows/elixir-ci.yml @@ -58,7 +58,9 @@ jobs: run: mix dialyzer - name: Execute tests - run: mix coveralls.json --warnings-as-errors + run: | + mix test --only integration --warnings-as-errors --max-cases 1 --cover --export-coverage integration-coverage + mix coveralls --exclude integration --warnings-as-errors --import-cover cover - name: Upload coverage report run: bash <(curl -s https://codecov.io/bash) diff --git a/test/config_cat_test.exs b/test/config_cat_test.exs index 9253e82..4503312 100644 --- a/test/config_cat_test.exs +++ b/test/config_cat_test.exs @@ -1,5 +1,8 @@ defmodule ConfigCatTest do - use ConfigCat.ClientCase, async: true + # Must be async: false to avoid a collision with other tests. + # Now that we only allow a single ConfigCat instance to use the same SDK key, + # one of the async tests would fail due to the existing running instance. + use ConfigCat.ClientCase, async: false import ExUnit.CaptureLog import Jason.Sigil diff --git a/test/integration_test.exs b/test/integration_test.exs index 78b687b..44d5d3d 100644 --- a/test/integration_test.exs +++ b/test/integration_test.exs @@ -9,6 +9,8 @@ defmodule ConfigCat.IntegrationTest do alias ConfigCat.InMemoryCache alias ConfigCat.LocalMapDataSource + @moduletag :integration + @sdk_key "configcat-sdk-1/PKDVCLf-Hq-h-kCzMp-L7Q/1cGEJXUwYUGZCBOL-E2sOw" describe "SDK key validation" do