From 5dce39d17f7aede05f6326fbe3514bd9431f832c Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Sun, 3 Dec 2023 10:17:24 +0400 Subject: [PATCH] Revert "CI: Remove test coverage" This reverts commit d99e139c6bec91150a10b68c032019a163eccf04. --- .gitlab-ci.yml | 8 +++++++- mix.exs | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1edfc02ea..10a843af2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,7 +125,13 @@ unit-testing: script: - mix ecto.create - mix ecto.migrate - - mix test --preload-modules + - mix test --cover --preload-modules + coverage: '/^Line total: ([^ ]*%)$/' + artifacts: + reports: + coverage_report: + coverage_format: cobertura + path: coverage.xml unit-testing-erratic: extends: diff --git a/mix.exs b/mix.exs index 85371c645..99074b433 100644 --- a/mix.exs +++ b/mix.exs @@ -190,6 +190,7 @@ defp deps do {:ex_machina, "~> 2.4", only: :test}, {:credo, "~> 1.6", only: [:dev, :test], runtime: false}, {:mock, "~> 0.3.5", only: :test}, + {:covertool, "~> 2.0", only: :test}, {:hackney, "~> 1.18.0", override: true}, {:mox, "~> 1.0", only: :test}, {:websockex, "~> 0.4.3", only: :test},