Skip to content

Commit 7cb15d3

Browse files
refactor: Simplify CI/CD pipeline to essentials
1 parent f747e9d commit 7cb15d3

1 file changed

Lines changed: 7 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,24 @@ jobs:
2727
working-directory: ./backend
2828
run: npm run build
2929

30-
- name: Create .env file for CI
30+
- name: Create .env file
3131
working-directory: ./backend
3232
run: |
3333
echo "REDIS_CLUSTER_NODES=redis-node-1:6379,redis-node-2:6379,redis-node-3:6379,redis-node-4:6379,redis-node-5:6379,redis-node-6:6379" >> .env
3434
echo "PORT=3000" >> .env
3535
36-
- name: Start all services
36+
- name: Start services
3737
run: docker-compose up --build -d
3838

39-
- name: Wait for services to be ready
39+
- name: Wait for startup
4040
run: sleep 20
4141

42-
- name: Check API health
43-
run: curl -f http://localhost:3000/health || (echo "Health check failed!" && docker-compose logs ratelimiterapi && exit 1)
44-
45-
- name: Verify health response
46-
run: |
47-
response=$(curl -s http://localhost:3000/health)
48-
echo "Health response: $response"
49-
if echo "$response" | grep -q "OK"; then
50-
echo "API is healthy!"
51-
else
52-
echo "API health check failed!"
53-
exit 1
54-
fi
55-
56-
- name: Show container status
57-
run: docker-compose ps
42+
- name: Test health endpoint
43+
run: curl -f http://localhost:3000/health
5844

5945
- name: Show logs
60-
run: docker-compose logs --tail=20
46+
if: failure()
47+
run: docker-compose logs
6148

6249
- name: Cleanup
6350
if: always()

0 commit comments

Comments
 (0)