-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
24 lines (16 loc) · 827 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.DEFAULT_GOAL := help
# `make help` generates a help message for each target that
# has a comment starting with ##
help:
@echo "Please use 'make <target>' where <target> is one of the following:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
lint: ## Perform linting
golangci-lint run --disable-all -E revive --exclude-use-default=false --modules-download-mode=vendor
test: ## Run unit tests
go test -mod=vendor `go list ./... | grep -v 'doc'` -race -cover
test-int: ## Run all tests
go test -mod=vendor `go list ./... | grep -v 'doc'` -race -tags=integration
build: ## Build the app executable for Linux
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=vendor -a ./...
fmt: ## Format the source code
go fmt ./...