-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
54 lines (38 loc) · 1.06 KB
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
51
52
# Export GO111MODULE=on to enable project to be built from within GOPATH/src
export GO111MODULE=on
GO_PACKAGES=$(shell go list ./... | grep -v vendor)
.PHONY: lint \
deps-update \
gofmt \
test-all \
test-features \
install \
vet \
vet:
go vet ${GO_PACKAGES}
lint:
@echo "Running go lint"
scripts/golangci-lint.sh
update-go:
scripts/install-latest-go.sh
deps-update:
go mod tidy && \
go mod vendor
test: unit-tests
gofmt:
@echo "Running gofmt"
gofmt -s -l `find . -path ./vendor -prune -o -type f -name '*.go' -print`
test-all: update-go install-ginkgo download-unstable
./scripts/run-tests.sh all
test-features: install-ginkgo download-unstable
FEATURES="$(FEATURES)" ./scripts/run-tests.sh features
download-unstable:
./scripts/download-unstable.sh
install-ginkgo:
go install "$$(awk '/ginkgo/ {printf "%s/ginkgo@%s", $$1, $$2}' go.mod)"
install: deps-update install-ginkgo
@echo "Installing needed dependencies"
unit-tests:
UNIT_TEST=true go test ./... -tags=utest -coverprofile=cover.out
coverage-html: test
go tool cover -html cover.out