diff --git a/.github/scripts/ensure-executor.sh b/.github/scripts/ensure-executor.sh deleted file mode 100644 index 4646e8cf5a..0000000000 --- a/.github/scripts/ensure-executor.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# Fail build if any command fails -set -e - -max_attempts=180 -attempt=0 -success=0 -while [ $attempt -lt $max_attempts ]; do - command="curl -s \$_APP_EXECUTOR_HOST/health -H \"Authorization: Bearer \$_APP_EXECUTOR_SECRET\"" - response=$(docker compose exec appwrite sh -c "$command") - - if [[ $response == *"runtimes"* ]]; then - success=1 - break - else - echo "Health check failed, retrying..." - sleep 1 - ((attempt++)) - fi -done - -if [ $success -eq 0 ]; then - echo "Failed to start Open Runtimes executor" - exit 1 -fi - -echo "Open Runtimes executor started" \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d6d9e78630..9dc466ac78 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -171,8 +171,12 @@ jobs: sleep 30 - name: Wait for Open Runtimes + timeout-minutes: 3 run: | - sh .github/scripts/ensure-executor.sh + while ! docker compose logs openruntimes-executor | grep -q "Executor is ready."; do + echo "Waiting for Executor to come online" + sleep 1 + done - name: Run ${{ matrix.service }} tests with Project table mode run: | @@ -238,8 +242,12 @@ jobs: sleep 30 - name: Wait for Open Runtimes + timeout-minutes: 3 run: | - sh .github/scripts/ensure-executor.sh + while ! docker compose logs openruntimes-executor | grep -q "Executor is ready."; do + echo "Waiting for Executor to come online" + sleep 1 + done - name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode run: |