Skip to content
Snippets Groups Projects
Commit 0de44b9c authored by ale's avatar ale
Browse files

Use the site standard Go test image for CI tests

parent 6efbd7eb
No related branches found
No related tags found
No related merge requests found
...@@ -16,19 +16,9 @@ build_pkg:bullseye:amd64: ...@@ -16,19 +16,9 @@ build_pkg:bullseye:amd64:
test: test:
stage: test stage: test
image: golang:1.15 image: registry.git.autistici.org/ai3/docker/test/golang:master
before_script:
# Install tooling dependencies.
- (cd /tmp && go get github.com/boumenot/gocover-cobertura)
- (cd /tmp && go get github.com/jstemmer/go-junit-report)
script: script:
# The following monstruosity is required to generate a single coverage - run-go-test ./...
# 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
artifacts: artifacts:
when: always when: always
reports: reports:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment