-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 737 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.PHONY: all clean download get-build-deps vet lint test cover
include ./vars.mk
all:
@$(MAKE) get-build-deps
@$(MAKE) download
@$(MAKE) vet
@$(MAKE) lint
@$(MAKE) cover
clean:
@rm -rf $(BUILD_DIR)
download:
$(GO_MOD) download
get-build-deps:
@echo "+ Downloading build dependencies"
@go install honnef.co/go/tools/cmd/staticcheck@latest
vet:
@echo "+ Vet"
@go vet ./...
lint:
@echo "+ Linting package"
@staticcheck ./...
$(call fmtcheck, .)
test:
@echo "+ Testing package"
$(GO_TEST) ./...
cover: test
@echo "+ Tests Coverage"
@mkdir -p $(BUILD_DIR)
@touch $(BUILD_DIR)/cover.out
@go test -coverprofile=$(BUILD_DIR)/cover.out ./...
@go tool cover -html=$(BUILD_DIR)/cover.out -o=$(BUILD_DIR)/coverage.html