-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
53 lines (37 loc) · 1.16 KB
/
Copy pathmakefile
File metadata and controls
53 lines (37 loc) · 1.16 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
POSTGRES_PORT ?= 5432
DB_URL ?= postgres://admin:secret@localhost:$(POSTGRES_PORT)/postgres_bd?sslmode=disable
.PHONY: run stop test lint e2e ci-local compose-up compose-down docker-up docker-down migrate-up migrate-down
run:
go run ./cmd/server
stop:
docker compose stop app
test:
go test ./internal/...
api-test:
make api-health-test
make api-auth-test
make api-accounts-test
api-health-test:
curl http://localhost:8080/health || (echo "Health check failed" && exit 1)
curl http://localhost:8080/health/live || (echo "Liveness check failed" && exit 1)
curl http://localhost:8080/health/ready || (echo "Readiness check failed" && exit 1)
api-auth-test:
go run ./scripts/api-auth-test/main.go
api-accounts-test:
go run ./scripts/api-accounts-test/main.go
lint:
go vet ./...
ci-local: lint test e2e
e2e:
go test -count=1 ./e2e/...
docker-up:
docker compose up --build -d --remove-orphans
docker-down:
docker compose down --remove-orphans
migrate-up:
goose -dir migrations postgres "$(DB_URL)" up
migrate-down:
goose -dir migrations postgres "$(DB_URL)" down
clean:
docker compose down --remove-orphans
docker volume rm processing_postgres_datatestpass