Merge branch 'add_unit_test_coverage_report' into 'main'

Add better reporting on unit tests

See merge request devs/moth!178
This commit is contained in:
John Donaldson 2022-10-21 21:57:43 +00:00
commit 5720961e85
1 changed files with 8 additions and 2 deletions

View File

@ -11,8 +11,14 @@ test:
- main
- merge_requests
script:
- go test -race ./...
- 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: