github.com/yandex/pandora@v0.5.32/Makefile (about)

     1  .PHONY: all test lint vet fmt travis coverage checkfmt prepare deps
     2  
     3  NO_COLOR=\033[0m
     4  OK_COLOR=\033[32;01m
     5  ERROR_COLOR=\033[31;01m
     6  WARN_COLOR=\033[33;01m
     7  
     8  
     9  all: test vet checkfmt
    10  
    11  travis: test checkfmt coverage
    12  
    13  prepare: fmt test vet
    14  
    15  test:
    16  	@echo "$(OK_COLOR)Test packages$(NO_COLOR)"
    17  	go test -race -v ./...
    18  
    19  coverage:
    20  	@echo "$(OK_COLOR)Make coverage report$(NO_COLOR)"
    21  	@./script/coverage.sh
    22  	-goveralls -coverprofile=gover.coverprofile -service=travis-ci
    23  
    24  vet:
    25  	@echo "$(OK_COLOR)Run vet$(NO_COLOR)"
    26  	@go vet ./...
    27  
    28  checkfmt:
    29  	@echo "$(OK_COLOR)Check formats$(NO_COLOR)"
    30  	@./script/checkfmt.sh .
    31  
    32  fmt:
    33  	@echo "$(OK_COLOR)Check fmt$(NO_COLOR)"
    34  	@echo "FIXME go fmt does not format imports, should be fixed"
    35  	@go fmt
    36  
    37  tools:
    38  	@echo "$(OK_COLOR)Install tools$(NO_COLOR)"
    39  	go install golang.org/x/tools/cmd/goimports@latest
    40  	go get golang.org/x/tools/cmd/cover
    41  	go get github.com/modocache/gover
    42  	go get github.com/mattn/goveralls
    43  
    44  deps:
    45  	$(info #Install dependencies...)
    46  	go mod tidy
    47  	go mod download