Skip to content
Snippets Groups Projects
Commit 437fdb0b authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

Resolve "Add code coverage checks and badges"

parent 06916ba9
No related branches found
No related tags found
1 merge request!23Resolve "Add code coverage checks and badges"
Pipeline #270379 passed
gen/*
bin/*
cover.profile
......@@ -46,8 +46,17 @@ test-go:
stage: test
image:
name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:${GOLANG_VERSION}
before_script:
- go install github.com/t-yuki/gocover-cobertura@latest
script:
- go test ./...
- go test ./... -coverprofile=cover.profile && go tool cover -func cover.profile
- gocover-cobertura < cover.profile > coverage.xml
coverage: /total:\s+\(statements\)\s+\d+.\d+%/
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
needs:
- generate-api
......
# Costaquanta
![Pipeline Status](https://gitlab.example.com/danet/costaquanta/badges/main/pipeline.svg)
![coverage](https://gitlab.example.com/danet/costaquanta/badges/main/coverage.svg)
This repository is used for development and testing of QKDN software.
It's use-case is research and development only.
If you are interested in production grade QKDN software, please feel free to contact us.
......
......@@ -11,7 +11,10 @@ build-api:
buf generate
test:
go test ./...
go test -coverprofile=cover.profile ./...
code-coverage: test
go tool cover -func cover.profile
lint:
docker run --rm -t -v $(pwd):/app -w /app \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment