Skip to content
Snippets Groups Projects
Commit 8e9d37a3 authored by Shrey Garg's avatar Shrey Garg Committed by Fabian Seidl
Browse files

Resolve "Adding support and visualization for the test coverage"

See merge request !335
parent a305223d
No related branches found
No related tags found
2 merge requests!335Resolve "Adding support and visualization for the test coverage",!333WIP: Develop
Pipeline #105011 passed
......@@ -11,6 +11,9 @@
when: always
reports:
junit: report.xml
coverage_report:
coverage_format: cobertura
path: ./controller/coverage.xml
needs:
- build-testing-image
......@@ -21,6 +24,7 @@ unit-test:
after_script:
- cd controller
- go tool cover -func=coverage.out
- gocover-cobertura < coverage.out > coverage.xml
<<: *test
controller-test:
......
......@@ -20,6 +20,7 @@ install-tools:
ci-install-tools:
go install gotest.tools/gotestsum@v1.7.0
go install github.com/boumenot/gocover-cobertura@v1.2.0
build:
$(GOBUILD) -o $(BINARY_NAME) ./cmd/gosdn
......@@ -41,7 +42,7 @@ controller-test: install-tools
ENVIRONMENT=testing ./$(TOOLS_DIR)/gotestsum --junitfile report.xml --format testname -- -race -v -run TestRun
ci-unit-test: ci-install-tools
ENVIRONMENT=testing gotestsum --junitfile report.xml --format testname -- -short -race $$( go list ./... | grep -v /forks/ | grep -v /mocks ) -v -coverprofile=coverage.out -timeout 30m
ENVIRONMENT=testing gotestsum --junitfile report.xml --format testname -- -short -race $$( go list ./... | grep -v /forks/ | grep -v /mocks ) -v -coverprofile=coverage.out -covermode atomic -timeout 30m
ci-controller-test: ci-install-tools
ENVIRONMENT=testing gotestsum --junitfile report.xml --format testname -- -race -v -run TestRun -coverprofile=coverage.out
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment