From 1851ec193914389a3019942b1f62cbc4a78803d6 Mon Sep 17 00:00:00 2001 From: Muhammadcell Date: Sat, 6 Jun 2026 14:28:24 +0500 Subject: [PATCH] ci(contract): run contract tests on pull requests Contract tests were skipped when upstream CI jobs failed, which hid contract feedback on pull requests. Running the job independently and waiting for every service keeps the PR signal visible. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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: