Merge branch 'add_coverage_report_html' into 'main'

Add more coverage artifacts

See merge request devs/moth!180
This commit is contained in:
John Donaldson 2022-10-25 21:27:42 +00:00
commit 5ba58664b6
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ test:
- 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
- go tool cover -html=coverage.txt -o coverage.html
- go tool cover -func coverage.txt
coverage: /\(statements\)(?:\s+)?(\d+(?:\.\d+)?%)/
artifacts:
@ -21,6 +22,9 @@ test:
coverage_report:
coverage_format: cobertura
path: coverage.xml
paths:
- coverage.html
- coverage.txt
push:
stage: push
rules: