From 8b9286bf20111c88fb0400ebd1fad4303223fd49 Mon Sep 17 00:00:00 2001 From: okoth Date: Thu, 10 Aug 2023 09:08:19 +0300 Subject: [PATCH] chore: setup coveralls --- .github/workflows/elixir.yml | 2 ++ coveralls.json | 7 +++++++ mix.exs | 12 ++++++++++-- mix.lock | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 coveralls.json diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index fdccc86..0f971cc 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -61,3 +61,5 @@ jobs: run: mix test - name: lint run: mix lint + - name: Run test coverage + run: mix coveralls \ No newline at end of file diff --git a/coveralls.json b/coveralls.json new file mode 100644 index 0000000..39b167d --- /dev/null +++ b/coveralls.json @@ -0,0 +1,7 @@ +{ + + "coverage_options": { + "minimum_coverage": 69.2 + }, + "skip_files": ["lib/elixir_conf_africa_web/components/core_components.ex"] +} \ No newline at end of file diff --git a/mix.exs b/mix.exs index 7c39a69..9216345 100644 --- a/mix.exs +++ b/mix.exs @@ -13,7 +13,14 @@ defmodule ElixirConfAfrica.MixProject do dialyzer: [ plt_local_path: "priv/plts", plt_add_apps: [:mix] - ] + ], + test_coverage: [tool: ExCoveralls], + preferred_cli_env: %{ + coveralls: :test, + "coveralls.detail": :test, + "coveralls.post": :test, + "coveralls.html": :test + } ] end @@ -55,7 +62,8 @@ defmodule ElixirConfAfrica.MixProject do {:jason, "~> 1.2"}, {:plug_cowboy, "~> 2.5"}, {:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false}, - {:credo, "~> 1.7", only: :dev, runtime: false} + {:credo, "~> 1.7", only: :dev, runtime: false}, + {:excoveralls, "~> 0.17.0", only: :test} ] end diff --git a/mix.lock b/mix.lock index 3cbaf35..70b9bbe 100644 --- a/mix.lock +++ b/mix.lock @@ -12,6 +12,7 @@ "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "esbuild": {:hex, :esbuild, "0.7.1", "fa0947e8c3c3c2f86c9bf7e791a0a385007ccd42b86885e8e893bdb6631f5169", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "66661cdf70b1378ee4dc16573fcee67750b59761b2605a0207c267ab9d19f13c"}, + "excoveralls": {:hex, :excoveralls, "0.17.0", "279f124dba347903bb654bc40745c493ae265d45040001b4899ea1edf88078c7", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "08b638d114387a888f9cb8d65f2a0021ec04c3e447b793efa7c1e734aba93004"}, "expo": {:hex, :expo, "0.4.1", "1c61d18a5df197dfda38861673d392e642649a9cef7694d2f97a587b2cfb319b", [:mix], [], "hexpm", "2ff7ba7a798c8c543c12550fa0e2cbc81b95d4974c65855d8d15ba7b37a1ce47"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, "finch": {:hex, :finch, "0.16.0", "40733f02c89f94a112518071c0a91fe86069560f5dbdb39f9150042f44dcfb1a", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f660174c4d519e5fec629016054d60edd822cdfe2b7270836739ac2f97735ec5"},