File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,25 @@ jobs:
1414 - name : Checkout code
1515 uses : actions/checkout@v4
1616
17- - name : Set up Docker Buildx
18- uses : docker/setup-buildx-action@v3
17+ # 🔧 REQUIRED: Go for E2E runner
18+ - name : Set up Go
19+ uses : actions/setup-go@v4
20+ with :
21+ go-version : " 1.20"
1922
23+ # 🔧 REQUIRED: create .env files from .env.example
24+ - name : Prepare env files for CI
25+ run : |
26+ cp services/product/.env.example services/product/.env
27+ cp services/cart/.env.example services/cart/.env
28+ cp services/orders/.env.example services/orders/.env
29+
30+ # 🚀 Start full stack
2031 - name : Build and start services
2132 run : |
2233 docker compose up -d --build
2334
35+ # ⏳ Wait until all services are ready
2436 - name : Wait for services to be healthy
2537 run : |
2638 echo "Waiting for services..."
@@ -38,15 +50,18 @@ jobs:
3850 docker compose logs
3951 exit 1
4052
53+ # 🧪 Full end-to-end checkout test
4154 - name : Run Full E2E Checkout Flow
4255 run : |
4356 go run ./tools/e2e_checkout/full_flow.go
4457
58+ # 🪵 Debug aid
4559 - name : Dump logs on failure
4660 if : failure()
4761 run : |
4862 docker compose logs
4963
64+ # 🧹 Always cleanup
5065 - name : Shutdown services
5166 if : always()
5267 run : |
Original file line number Diff line number Diff line change 1+ CART_SERVICE_PORT = 8081
2+ REDIS_ADDR = redis:6379
3+ REDIS_PASSWORD =
4+ PRODUCT_SVC_BASE = http://product:8080
5+ CART_TTL_USER_DAYS = 30
6+ CART_TTL_GUEST_DAYS = 7
Original file line number Diff line number Diff line change 1+ DATABASE_URL = postgres://postgres:postgres@postgres:5432/sabhyatam?sslmode=disable
2+ CART_SVC_BASE = http://cart:8081
3+ PRODUCT_SVC_BASE = http://product:8080
4+ PRODUCT_ADMIN_KEY = sabhyatam-secret
You can’t perform that action at this time.
0 commit comments