GODT-2287: Add code coverage to artifacts and pipeline.

This commit is contained in:
Jakub
2023-01-30 13:40:38 +01:00
committed by Jakub Cuth
parent e464e11ab9
commit 0182e2c0bc

View File

@ -54,6 +54,18 @@ stages:
allow_failure: true
- when: never
.after-script-code-coverage:
after_script:
- go get github.com/boumenot/gocover-cobertura
- go run github.com/boumenot/gocover-cobertura < /tmp/coverage.out > coverage.xml
- "go tool cover -func=/tmp/coverage.out | grep total:"
coverage: '/total:.*\(statements\).*\d+\.\d+%/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
# Stage: TEST
lint:
@ -69,6 +81,7 @@ test-linux:
stage: test
extends:
- .rules-branch-manual-MR-always
- .after-script-code-coverage
script:
- make test
tags:
@ -106,6 +119,8 @@ dependency-updates:
script:
- make updates
# Stage: BUILD
.build-base: