-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (34 loc) · 1.1 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
BINDIR ?= $(CURDIR)/bin
GINKGO_VERSION = $(shell go list -f '{{ .Version }}' -m github.com/onsi/ginkgo/v2)
GOLANGCI_LINT_VERSION=v1.52.2
test: generate
@$(BINDIR)/ginkgo version
$(BINDIR)/ginkgo \
--randomize-all --randomize-suites --fail-on-pending \
--cover --trace --race -v \
./pkg/...
make -C _examples/http test
make -C _examples/maelstrom test
e2e-tests:
make -C _examples/maelstrom e2e-tests
fmt:
go fmt ./pkg/...
make -C _examples/http fmt
make -C _examples/maelstrom fmt
vet:
go vet ./pkg/...
make -C _examples/http vet
make -C _examples/maelstrom vet
generate:
go generate ./pkg/...
make -C _examples/http generate
make -C _examples/maelstrom generate
lint:
@$(BINDIR)/golangci-lint version
$(BINDIR)/golangci-lint run ./pkg/...
make -C _examples/http lint
make -C _examples/maelstrom lint
dependencies:
test -d $(BINDIR) || mkdir $(BINDIR)
GOBIN=$(BINDIR) go install github.com/onsi/ginkgo/v2/ginkgo@$(GINKGO_VERSION)
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | BINARY=golangci-lint bash -s -- -b $(BINDIR) $(GOLANCI_LINT_VERSION)