-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (41 loc) · 800 Bytes
/
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
SHELL := /bin/bash
export GOBIN := $(CWD)/.bin
NAME=schema-registry-statistics
.PHONY: build
build:
GOARCH=amd64 GOOS=darwin go build -o ${NAME}-darwin main.go
GOARCH=amd64 GOOS=linux go build -o ${NAME}-linux main.go
.PHONY: clean
clean:
go clean
rm ${NAME}-darwin
rm ${NAME}-linux
.PHONY: test
test:
go test -v ./...
.PHONY: test_coverage
test_coverage:
go test -v ./... -coverprofile=coverage.out
.PHONY: dep
dep:
go mod download
.PHONY: tidy
tidy:
go mod tidy
.PHONY: safe
safe:
go vet
go test -race .
go build -race .
.PHONY: test_race
test_race:
go run -race . --bootstrap "localhost:9092" \
--topic "payments-topic" \
--group "TEST_GROUP" \
--tls --cert "ca.pem" \
--user "USERNAME" \
--password "PASSWORD" \
--oldest --verbose
.PHONY: lint
lint:
golangci-lint run