-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (43 loc) · 1.49 KB
/
Makefile
File metadata and controls
56 lines (43 loc) · 1.49 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
54
.PHONY: help build test run clean style-check smoke-test docker-build docker-run docker-stop
help:
@echo "Available commands:"
@echo " help - Show this help message"
@echo " build - Build the project"
@echo " test - Run unit tests (WIP)"
@echo " run - Run the application locally"
@echo " clean - Clean build artifacts"
@echo " style-check - Run style checking"
@echo " smoke-test - Run smoke tests with Docker"
@echo " docker-build - Build Docker image"
@echo " docker-run - Run with Docker Compose"
@echo " docker-stop - Stop Docker Compose"
build:
./mvnw clean compile
test:
./mvnw test
run:
./mvnw spring-boot:run
clean:
./mvnw clean
style-check:
./mvnw checkstyle:check
./mvnw pmd:check pmd:cpd-check
run-db:
docker compose up postgres -d
docker-build:
docker build -t h2go:latest .
docker-run:
docker-compose up -d
docker-stop:
docker-compose down
smoke-test: docker-build
docker compose down
@echo "Starting services for smoke testing..."
docker-compose -f docker-compose.test.yml up -d
@echo "Waiting for services to be healthy..."
@timeout 120 bash -c 'until curl -f http://localhost:8081/actuator/health; do sleep 2; done' || \
(echo "❌ Service failed to start within timeout"; docker-compose -f docker-compose.test.yml down; exit 1)
@echo "Running smoke tests..."
@curl -f http://localhost:8081/actuator/health
@echo "Smoke tests passed!"
docker-compose -f docker-compose.test.yml down -v