From c9a5299f0cd2b2ea3fd390ae2ea5d646d1454542 Mon Sep 17 00:00:00 2001 From: Jan-Eric Hellenberg Date: Mon, 10 May 2021 10:49:10 +0200 Subject: [PATCH] Exclude Mock files from coverage --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c8e92f..ca34cf2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,6 +50,8 @@ test: needs: [] script: - go test $(go list ./... | grep -v /e2e_tests) -v -coverprofile coverage.cov + - # exclude Mock files from coverage report + - cat coverage.cov | grep -v Mock.go > coverage.cov || true - go tool cover -func=coverage.cov - go tool cover -html=coverage.cov -o coverage_unit.html artifacts: