Skip to content

Commit

Permalink
Add cover target to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-howell committed Aug 23, 2019
1 parent 8a8698c commit aabbbf0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
@@ -1,5 +1,7 @@
BIN_NAME=kustomize

COVER_FILE=coverage.out

export GO111MODULE=on

all: test build
Expand All @@ -21,8 +23,15 @@ build:
install:
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:
go clean
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

0 comments on commit aabbbf0

Please sign in to comment.