mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Merge pull request #1474 from keleustes/coverage
Add cover target to Makefile
This commit is contained in:
11
Makefile
11
Makefile
@@ -1,5 +1,7 @@
|
|||||||
BIN_NAME=kustomize
|
BIN_NAME=kustomize
|
||||||
|
|
||||||
|
COVER_FILE=coverage.out
|
||||||
|
|
||||||
export GO111MODULE=on
|
export GO111MODULE=on
|
||||||
|
|
||||||
all: test build
|
all: test build
|
||||||
@@ -21,8 +23,15 @@ build:
|
|||||||
install:
|
install:
|
||||||
go install $(PWD)/cmd/kustomize
|
go install $(PWD)/cmd/kustomize
|
||||||
|
|
||||||
|
cover:
|
||||||
|
# The plugin directory eludes coverage, and is therefore omitted
|
||||||
|
go test ./pkg/... ./k8sdeps/... ./internal/... -coverprofile=$(COVER_FILE) && \
|
||||||
|
go tool cover -html=$(COVER_FILE)
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
go clean
|
go clean
|
||||||
rm -f $(BIN_NAME)
|
rm -f $(BIN_NAME)
|
||||||
|
rm -f $(COVER_FILE)
|
||||||
|
|
||||||
.PHONY: test build install clean generate-code test-go test-lint
|
.PHONY: test build install clean generate-code test-go test-lint cover
|
||||||
|
|||||||
Reference in New Issue
Block a user