Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ale/autoradio
1 result
Show changes
Commits on Source (4)
...@@ -16,11 +16,21 @@ build_pkg:bullseye:amd64: ...@@ -16,11 +16,21 @@ build_pkg:bullseye:amd64:
test: test:
stage: test stage: test
image: golang:1.14 image: golang:1.15
script: before_script:
- go test -v -cover -coverprofile=cover.out ./... # Install tooling dependencies.
- (cd /tmp && go get github.com/boumenot/gocover-cobertura) - (cd /tmp && go get github.com/boumenot/gocover-cobertura)
- (cd /tmp && go get github.com/jstemmer/go-junit-report)
script:
# The following monstruosity is required to generate a single coverage
# result statement for the entire package, but without generating build
# errors due to multiple definition of flags in cmd/ tools.
# See also https://github.com/golang/go/issues/27333
- go test -v -cover -coverpkg=$(go list ./... | grep -v /cmd/) -coverprofile=cover.out ./... 2>&1 | go-junit-report -set-exit-code > report.xml
# Convert coverage output to XML for Gitlab integration.
- gocover-cobertura < cover.out > cover.xml - gocover-cobertura < cover.out > cover.xml
artifacts: artifacts:
when: always
reports: reports:
cobertura: cover.xml cobertura: cover.xml
junit: report.xml