-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (65 loc) · 2.98 KB
/
Makefile
File metadata and controls
76 lines (65 loc) · 2.98 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# ######################################################################################################################
# Dev Tools
# ######################################################################################################################
dev-setup:
go install honnef.co/go/tools/cmd/staticcheck@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
go install github.com/rakyll/gotest@latest
go install golang.org/x/pkgsite/cmd/pkgsite@latest
# ######################################################################################################################
# Tests
# ######################################################################################################################
test:
CGO_ENABLED=1 go -C client tool gotest -v -race -count=1 ./...
CGO_ENABLED=1 go -C web tool gotest -v -race -count=1 ./...
test-e2e:
CGO_ENABLED=1 VERBOSE=1 go -C e2e tool gotest -v -race -count=1 -tags=integration ./...
test-integration:
CGO_ENABLED=0 go -C client tool gotest -v -race -count=1 -tags=integration ./...
CGO_ENABLED=0 go -C web tool gotest -v -race -count=1 -tags=integration ./...
CGO_ENABLED=1 go -C e2e tool gotest -v -race -count=1 -tags=integration ./...
test-verbose:
CGO_ENABLED=1 VERBOSE=1 go -C client tool gotest -v -race -count=1 ./...
CGO_ENABLED=1 VERBOSE=1 go -C web tool gotest -v -race -count=1 ./...
lint:
CGO_ENABLED=0 go -C client vet ./...
go -C client tool staticcheck -checks=all ./...
CGO_ENABLED=0 go -C web vet ./...
go -C web tool staticcheck -checks=all ./...
vuln:
go -C client tool govulncheck ./...
go -C web tool govulncheck ./...
check: test lint vuln
# ######################################################################################################################
# Docs
# ######################################################################################################################
docs-client:
@echo "Starting pkgsite at http://localhost:6060/github.com/adamwoolhether/httper/client"
@open http://localhost:6060/github.com/adamwoolhether/httper/client &
go -C client tool pkgsite -http=localhost:6060
docs-web:
@echo "Starting pkgsite at http://localhost:6060/github.com/adamwoolhether/httper/web"
@open http://localhost:6060/github.com/adamwoolhether/httper/web &
go -C web tool pkgsite -http=localhost:6060
# ######################################################################################################################
# Modules
# ######################################################################################################################
tidy:
go -C client mod tidy
go -C e2e mod tidy
go -C web mod tidy
deps-upgrade:
go -C client get -u -v -tool ./...
go -C client mod tidy
go -C web get -u -v -tool ./...
go -C web mod tidy
deps-cleancache:
go clean -modcache
deps-list:
go -C client list -m -u -mod=readonly all
go -C web list -m -u -mod=readonly all
deps-reset:
git checkout -- client/go.mod client/go.sum
go -C client mod tidy
git checkout -- web/go.mod web/go.sum
go -C web mod tidy