From 92d904150a6f1086404101cae90842d36a04cba2 Mon Sep 17 00:00:00 2001 From: John Donaldson Date: Fri, 21 Oct 2022 14:52:26 -0700 Subject: [PATCH] Add better reporting on unit tests --- .gitlab-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1cd0d50..5c50c8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,8 +11,15 @@ test: - main - merge_requests script: - - go test -race ./... - + - go install + - go test -coverprofile=coverage.txt -covermode=atomic -race ./... + - go get github.com/boumenot/gocover-cobertura + - go run github.com/boumenot/gocover-cobertura < coverage.txt > coverage.xml + artifacts: + reports: + coverage_report: + coverage_format: cobertura + path: coverage.xml push: stage: push rules: