Skip to content
Snippets Groups Projects
Commit d929e79b authored by Tangui Didailler's avatar Tangui Didailler Committed by Pierre Smeyers
Browse files

feat: add `GO_COBERTURA_FLAGS` env var for `gocover-cobertura`

parent 18f6a14a
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,7 @@ These jobs use the following variable:
| `GO_LIST_ARGS` | Arguments used by the list command | `list -u -m -mod=readonly -json all` |
| `GO_TARGET_OS` | The `GOOS` target [see available values](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) | _none_ (fallback to go docker image `GOOS`) |
| `GO_TARGET_ARCH` | The `GOARCH` target [see available values](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) | _none_ (fallback to go docker image `GOARCH`) |
| `GO_COBERTURA_FLAGS` | The `GOFLAGS` to use with `gocover-cobertura` if needed | _none_ |
In addition to a textual report in the console, the test jobs produce the following reports, kept for one day:
......
......@@ -80,6 +80,11 @@
"description": "Arguments used by the list command",
"default": "list -u -m -mod=readonly -json all",
"advanced": true
},
{
"name": "GO_COBERTURA_FLAGS",
"description": "Build flags to add to use gocover-cobertura, leave blank if not needed",
"advanced": true
}
],
"features": [
......
......@@ -248,7 +248,7 @@ stages:
echo "${percent} covered"
go get github.com/boumenot/gocover-cobertura
go run github.com/boumenot/gocover-cobertura < "$coverage_out" > reports/go-coverage.cobertura.xml
GOFLAGS="$GO_COBERTURA_FLAGS" go run github.com/boumenot/gocover-cobertura < "$coverage_out" > reports/go-coverage.cobertura.xml
else
log_info "--- \\e[32mCoverage report(s) not found\\e[0m: skip"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment