Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: SyncForge CI

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand Down Expand Up @@ -52,8 +50,8 @@ jobs:
- name: Build frontend
run: npm run build

docker-build:
name: Docker Build
docker-smoke-test:
name: Docker Build and Smoke Test
runs-on: ubuntu-latest
needs:
- backend-tests
Expand All @@ -68,3 +66,37 @@ jobs:

- name: Build Docker images
run: docker compose build

- name: Start Docker Compose stack
run: docker compose up -d

- name: Wait for backend health
run: |
for i in {1..30}; do
if curl -fsS http://localhost:8080/actuator/health; then
echo "Backend is healthy"
exit 0
fi

echo "Waiting for backend..."
sleep 5
done

echo "Backend did not become healthy"
docker compose logs syncforge-api
exit 1

- name: Check frontend response
run: curl -fsS http://localhost:3000 > /dev/null

- name: Show running containers
if: always()
run: docker compose ps

- name: Show logs on failure
if: failure()
run: docker compose logs

- name: Stop Docker Compose stack
if: always()
run: docker compose down -v
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ services:
restart: unless-stopped
ports:
- "8080:8080"
environment:
SYNCFORGE_SECURITY_JWT_SECRET: "ci-local-dev-secret-key-12345678901234567890"
SYNCFORGE_SECURITY_JWT_ACCESS_TOKEN_MINUTES: "15"
SYNCFORGE_SECURITY_REFRESH_TOKEN_DAYS: "7"
depends_on:
mysql:
condition: service_healthy
Expand Down
Loading