-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (22 loc) · 726 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (22 loc) · 726 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
.PHONY: run build test test-integration test-concurrency load-test migrate-up migrate-down compose-up compose-down
DB_URL ?= "postgresql://journal:journal@localhost:5432/journal?sslmode=disable"
run:
go run cmd/api/main.go
build:
go build -o api ./cmd/api/...
test:
go test -race -cover ./internal/domain/... ./internal/ledger/...
test-integration:
go test -race -v ./test/integration/...
test-concurrency:
go test -race -count=50 -timeout=300s ./test/concurrency/...
load-test:
k6 run load/scenarios/baseline.js
migrate-up:
migrate -path migrations -database $(DB_URL) up
migrate-down:
migrate -path migrations -database $(DB_URL) down
compose-up:
docker compose up -d
compose-down:
docker compose down