-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (33 loc) · 934 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
.PHONY: test
test:
go test $(GOTEST_FLAGS) -race ./...
.PHONY: test-integration
test-integration:
# run required docker containers, execute integration tests, stop containers after tests
docker compose -f test/docker-compose-postgres.yml up --quiet-pull -d --wait
go test $(GOTEST_FLAGS) -race --tags=integration ./...; ret=$$?; \
docker compose -f test/docker-compose-postgres.yml down; \
exit $$ret
.PHONY: lint
lint:
golangci-lint run
.PHONY: fmt
fmt:
gofumpt -l -w .
.PHONY: install-tools
install-tools:
@echo Installing tools from tools.go
@go list -e -f '{{ join .Imports "\n" }}' tools.go | xargs -I % go list -f "%@{{.Module.Version}}" % | xargs -tI % go install %
@go mod tidy
.PHONY: generate
generate:
go generate ./...
.PHONY: proto-generate
proto-generate:
cd proto && buf generate
.PHONY: proto-update
proto-update:
cd proto && buf dep update
.PHONY: proto-lint
proto-lint:
cd proto && buf lint