-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (36 loc) · 1.09 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
ALL_TESTS_TAGS=unit,integration,racy,long
DEV_TESTS_TAGS=unit,integration
.DEFAULT_GOAL := all
.PHONY: all
all: lint test
.PHONY: lint
lint:
golangci-lint run --build-tags ${ALL_TESTS_TAGS} -v
.PHONY: lint-fix
lint-fix:
golangci-lint run --build-tags ${ALL_TESTS_TAGS} -v --fix
.PHONY: test
test:
go test -v -race -tags ${DEV_TESTS_TAGS} -shuffle on -coverprofile=cover.out ./...
.PHONY: test-unit
test-unit:
go test -v -race -tags unit -shuffle on ./...
.PHONY: test-integration
test-integration:
go test -v -race -tags integration -shuffle on ./...
.PHONY: test-racy
test-racy:
go test -v -race -tags racy -shuffle on ./...
.PHONY: test-long
test-long:
go test -v -race -tags long -shuffle on ./...
.PHONY: cover
cover: test test-long test-racy
@go tool cover -html=cover.out -o=cover.html
.PHONY: messages
messages:
protoc --go_out=internal/messaging ./internal/messaging/*.proto
mkdir -p internal/message/protocol
mkdir -p internal/message/test
mv internal/messaging/go.eloylp.dev/goomerang/internal/protocol/*.pb.go internal/messaging/protocol
rm -rf internal/messaging/go.eloylp.dev