-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
47 lines (33 loc) · 834 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
MODULE = $(shell go list -m)
.PHONY: docs generate test lint cleantests compose
cleantests:
@go clean -testcache
tests: test.clean test test.datarace test.build lint
test:
@echo "Run tests"
@go test ./... -timeout 5m
test.clean:
@echo "Clean test cache"
@go clean -testcache
test.datarace:
@echo "Run tests with datarace"
@go test ./... -race -timeout 5m
test.build:
@echo "Run test build"
@go build -o /dev/null
lint:
@echo "Run check lint"
@gofmt -d .
generate:
@go generate ./...
build: # build a server
@go build -a -o app-server $(MODULE)/cmd/server
compose.%:
$(eval CMD=${subst compose.,,$(@)})
./fixtures/scripts/compose.sh ${CMD}
it.postman:
@bash integration/postman/run-api-tests.sh
it.e2e:
@cd ./integration && go test ./... -v
docs:
redoc-cli bundle ./docs/swagger.json -o ./docs/doc.html