blob: 4714d7798fe4862863d720639f037bf3c9f274f3 [file] [log] [blame]
khenaidood948f772021-08-11 17:49:24 -04001default: fmt get update test lint
William Kurkiandaa6bb22019-03-07 12:26:28 -05002
khenaidood948f772021-08-11 17:49:24 -04003GO := go
4GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
5GOTEST := $(GO) test -gcflags='-l' -p 3 -v -race -timeout 6m -coverprofile=profile.out -covermode=atomic
khenaidooac637102019-01-14 15:44:34 -05006
khenaidood948f772021-08-11 17:49:24 -04007FILES := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -not -name '*_test.go')
8TESTS := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -name '*_test.go')
khenaidooac637102019-01-14 15:44:34 -05009
khenaidooac637102019-01-14 15:44:34 -050010get:
khenaidood948f772021-08-11 17:49:24 -040011 $(GO) get ./...
12 $(GO) mod verify
13 $(GO) mod tidy
Scott Baker8461e152019-10-01 14:44:30 -070014
khenaidood948f772021-08-11 17:49:24 -040015update:
16 $(GO) get -u -v ./...
17 $(GO) mod verify
18 $(GO) mod tidy
19
20fmt:
21 gofmt -s -l -w $(FILES) $(TESTS)
22
23lint:
24 GOFLAGS="-tags=functional" golangci-lint run
25
26test:
27 $(GOTEST) ./...
28
29.PHONY: test_functional
30test_functional:
31 $(GOTEST) -tags=functional ./...