-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (30 loc) · 906 Bytes
/
Makefile
File metadata and controls
41 lines (30 loc) · 906 Bytes
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: tools hooks test lint e2e check setup up down clean logs
# Install development tools
tools:
go install github.com/golangci/golangci-lint/v2/cmd/[email protected]
go install github.com/evilmartians/lefthook/[email protected]
# Setup git hooks
hooks:
lefthook install
# Run tests with race detector
test:
go test -race -v -count=1 ./...
# Run linter
lint:
golangci-lint run ./...
# Run lint and tests
check: lint test
# Run e2e tests (requires Docker)
e2e:
cd test && go test -race -v -count=1 -timeout=10m ./...
# Setup development environment
setup: tools hooks
# Docker: make up APP=postgres | make down APP=postgres | make clean APP=postgres
up:
docker compose -f _examples/$(APP)/compose.yml up -d
down:
docker compose -f _examples/$(APP)/compose.yml down
clean:
docker compose -f _examples/$(APP)/compose.yml down -v
logs:
docker compose -f _examples/$(APP)/compose.yml logs -f