diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9a4a68..5d6c511 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,61 +53,6 @@ jobs: - name: Run tests run: pnpm test - e2e: - name: E2E Tests - runs-on: ubuntu-latest - needs: [lint-typecheck, test] - steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4 - with: - version: '9.15.4' - - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Install Playwright browsers - run: pnpm --filter @groombook/e2e exec playwright install --with-deps chromium - - - name: Start Docker Compose stack - run: docker compose up -d - timeout-minutes: 5 - - - name: Wait for services to be ready - run: | - echo "Waiting for services to become ready..." - for i in $(seq 1 60); do - # Poll both the web root (proves nginx + static app are up) and the - # API /health endpoint (proves the Node server is responding). - WEB_STATUS=$(curl -sf -o /dev/null -w "%{http_code}" http://localhost:8080 2>/dev/null || echo "000") - API_STATUS=$(curl -sf -o /dev/null -w "%{http_code}" http://localhost:3000/health 2>/dev/null || echo "000") - if [ "$WEB_STATUS" = "200" ] && [ "$API_STATUS" = "200" ]; then - echo "Both services healthy after ${i} attempts (web=$WEB_STATUS, api=$API_STATUS)" - echo "Allowing 30s grace period for nginx to fully initialize..." - sleep 30 - exit 0 - fi - echo "Attempt $i/60: web=$WEB_STATUS api=$API_STATUS — waiting 10s..." - sleep 10 - done - echo "Warning: services may not be fully ready after 60 attempts (10m)" - timeout-minutes: 12 - - - name: Run E2E tests - run: pnpm --filter @groombook/e2e test - env: - PLAYWRIGHT_BASE_URL: http://localhost:8080 - - - name: Stop Docker Compose stack - if: always() - run: docker compose down - build: name: Build runs-on: ubuntu-latest @@ -135,7 +80,7 @@ jobs: docker: name: Build & Push Docker Images runs-on: ubuntu-latest - needs: [build, e2e] + needs: [build] outputs: tag: ${{ steps.version.outputs.tag }} steps: