-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
60 lines (42 loc) · 1.2 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
48
49
50
51
52
53
54
55
56
57
58
59
60
# Check to see if we can use ash, in Alpine images, or default to BASH.
SHELL_PATH = /bin/ash
SHELL = $(if $(wildcard $(SHELL_PATH)),/bin/ash,/bin/bash)
# ==============================================================================
# Chat
hack:
go run chat/api/tooling/hack/main.go
run-cap:
go run chat/api/services/cap/main.go | go run chat/api/tooling/logfmt/main.go
run-client:
go run chat/api/frontends/client/main.go
chat-test:
curl -i -X GET http://localhost:3000/test
chat-docker:
docker pull nats:2.10
chat-nats:
docker run -p 4222:4222 nats:2.10 -js
chat-nats-down:
docker stop nats:2.10
docker rm nats:2.10 -v
# ==============================================================================
# Modules support
tidy:
go mod tidy
go mod vendor
deps-upgrade:
go get -u -v ./...
go mod tidy
go mod vendor
# ==============================================================================
# Running tests within the local computer
test-r:
CGO_ENABLED=1 go test -race -count=1 ./...
test-only:
CGO_ENABLED=0 go test -count=1 ./...
lint:
CGO_ENABLED=0 go vet ./...
staticcheck -checks=all ./...
vuln-check:
govulncheck ./...
test: test-only lint vuln-check
test-race: test-r lint vuln-check