This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11* .tar.gz
22* .dockerapp
33_build /
4- codecoverage /* .out
54! examples /simple /* .dockerapp
Original file line number Diff line number Diff line change @@ -82,20 +82,21 @@ unit-test:
8282 $(GO_TEST ) $(shell go list ./... | grep -vE '/e2e')
8383
8484coverage-bin :
85- $(GO_TEST ) -coverpkg=" ./..." -c -tags testrunmain -o _build/$(BIN_NAME ) .cov
85+ $(GO_TEST ) -coverpkg=" ./..." -c -ldflags= $( LDFLAGS ) - tags testrunmain -o _build/$(BIN_NAME ) .cov
8686 go install ./vendor/github.com/wadey/gocovmerge/
8787
8888coverage : coverage-bin
89+ mkdir -p _build/cov
8990 @echo " Running e2e tests (coverage)..."
90- DOCKERAPP_BINARY=../codecoverage /coverage-bin $(GO_TEST ) -v ./e2e
91+ DOCKERAPP_BINARY=../e2e /coverage-bin $(GO_TEST ) -v ./e2e
9192 @echo " Running unit tests (coverage)..."
92- $(GO_TEST ) -cover -test.coverprofile=codecoverage /unit.out $(shell go list ./... | grep -vE '/vendor/|/e2e')
93- gocovmerge codecoverage/ * .out > codecoverage /all.out
94- go tool cover -func codecoverage /all.out
95- go tool cover -html codecoverage/ all.out -o codecoverage /coverage.html
93+ $(GO_TEST ) -cover -test.coverprofile=_build/cov /unit.out $(shell go list ./... | grep -vE '/vendor/|/e2e')
94+ gocovmerge _build/cov/ * .out > _build/cov /all.out
95+ go tool cover -func _build/cov /all.out
96+ go tool cover -html _build/cov/ all.out -o _build/cov /coverage.html
9697
9798clean :
98- rm -Rf ./_build docker-app-* .tar.gz codecoverage/ * .out codecoverage/ * .html
99+ rm -Rf ./_build docker-app-* .tar.gz
99100
100101# #########################
101102# Continuous Integration #
Original file line number Diff line number Diff line change 44# It allows us to use a coverage-enabled binary for e2e tests
55
66../_build/docker-app.cov \
7- -test.coverprofile=../codecoverage /$( uuidgen) .out \
7+ -test.coverprofile=../_build/cov /$( uuidgen) .out \
88 $* \
99| grep -vE ' ^PASS$' \
1010| grep -vE ' ^coverage: [0-9]+\.[0-9]+% of statements in .+$' \
You can’t perform that action at this time.
0 commit comments