diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f65e01..9a93b19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,7 +104,7 @@ jobs: contract: name: Contract tests runs-on: ubuntu-latest - needs: [api, bot] + timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v4 @@ -165,8 +165,10 @@ jobs: docker compose up -d \ postgres redis pgbouncer db-init \ booking-service payment-service calendar-service - # Wait up to 90s for booking-service to become healthy. - timeout 90 sh -c 'until docker compose ps booking-service | grep -q "healthy"; do sleep 3; done' + # Wait for every contract endpoint before running the tests. + for service in booking-service payment-service calendar-service; do + timeout 120 sh -c "until docker compose ps $service | grep -q 'healthy'; do docker compose ps $service; sleep 3; done" + done - name: Run contract tests env: