diff --git a/.github/actions/setup-stellar/action.yaml b/.github/actions/setup-stellar/action.yaml index a4421ac71b..da7a6d709d 100644 --- a/.github/actions/setup-stellar/action.yaml +++ b/.github/actions/setup-stellar/action.yaml @@ -29,27 +29,30 @@ runs: - name: Wait for Stellar network shell: bash run: | - MAX_WAIT=120 + MAX_WAIT=180 ELAPSED=0 echo "Waiting for Stellar network to become ready..." + while true; do echo "Checking Friendbot: ${{ steps.env.outputs.friendbot }} ..." - if curl -s "${{ steps.env.outputs.friendbot }}" | grep -q '"status"'; then - echo "✅ Stellar Network is ready" - exit 0 + + if curl -s "${{ steps.env.outputs.friendbot }}" | grep -q '"status"\|"friendbot"'; then + echo "✅ Stellar Network is ready" + exit 0 fi - sleep 2 - ELAPSED=$((ELAPSED + 2)) + sleep 3 + ELAPSED=$((ELAPSED + 3)) if [ "$ELAPSED" -ge "$MAX_WAIT" ]; then - echo "Timed out after $MAX_WAIT seconds waiting for Stellar network." + echo "❌ Timed out after $MAX_WAIT seconds waiting for Stellar network." + echo "Container logs:" + stellar network container logs local | tail -50 || echo "Could not fetch logs" exit 1 fi - echo " - Stellar Network not ready yet" - + echo " - Stellar Network not ready yet (elapsed: ${ELAPSED}s / ${MAX_WAIT}s)" done - name: Add as configured network diff --git a/.github/workflows/test-stellar.yaml b/.github/workflows/test-stellar.yaml index 3092cfeace..6153382a15 100644 --- a/.github/workflows/test-stellar.yaml +++ b/.github/workflows/test-stellar.yaml @@ -20,6 +20,7 @@ jobs: - 'common/**' github: - '.github/workflows/test-stellar.yaml' + - '.github/actions/setup-stellar/**' - name: Summarize Changes run: | echo "Changes in stellar: ${{ steps.filter.outputs.stellar }}"