diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index e498252b..e78526fb 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -53,7 +53,19 @@ jobs: - name: Compile run: rebar3 as test compile - name: ExUnit - run: mix test --no-start test/otel_tests.exs test/otel_metric_tests.exs + run: mix test --no-start --cover test/otel_tests.exs test/otel_metric_tests.exs + - uses: codecov/codecov-action@v3 + if: ${{ always() }} + with: + file: opentelemetry.covertool.xml + env_vars: OTP_VERSION,ELIXIR_VERSION + flags: sdk,elixir + - uses: codecov/codecov-action@v3 + if: ${{ always() }} + with: + file: opentelemetry_api.covertool.xml + env_vars: OTP_VERSION,ELIXIR_VERSION + flags: api,elixir api_tests: runs-on: ${{ matrix.os }} diff --git a/mix.exs b/mix.exs index 639eccb9..982a5b79 100644 --- a/mix.exs +++ b/mix.exs @@ -6,12 +6,17 @@ defmodule OtelElixirTests.MixProject do app: :otel_elixir_tests, version: "0.1.0", deps: deps(), - elixirc_paths: elixirc_paths(Mix.env()) + elixirc_paths: elixirc_paths(Mix.env()), + test_coverage: [tool: :covertool, include_apps: [:opentelemetry, :opentelemetry_api]] ] end def deps do [ + {:covertool, + git: "https://github.com/albertored/covertool.git", + branch: "add-include-apps-mix", + only: :test}, {:opentelemetry, path: "apps/opentelemetry", only: :test, override: true}, {:opentelemetry_api, path: "apps/opentelemetry_api", only: :test, override: true}, {:opentelemetry_semantic_conventions, diff --git a/rebar.config b/rebar.config index dc4f2f51..cd4c663e 100644 --- a/rebar.config +++ b/rebar.config @@ -65,7 +65,7 @@ {cover_enabled, true}. {cover_export_enabled, true}. -{covertool, [{coverdata_files, ["ct.coverdata"]}]}. +{covertool, [{coverdata_files, ["ct.coverdata", "eunit.coverdata"]}]}. {cover_excl_apps, [opentelemetry_api_experimental, opentelemetry_experimental]}. {cover_excl_mods, [opentelemetry_exporter_trace_service_pb, opentelemetry_trace_service, opentelemetry_zipkin_pb, opentelemetry_exporter_metrics_service_pb,