Fix tests

This commit is contained in:
Matej Bačo
2025-02-19 15:50:16 +01:00
parent 322b726196
commit 4a0d33213a
+42 -13
View File
@@ -172,27 +172,30 @@ jobs:
- name: Wait for Open Runtimes
run: |
max_attempts=25
delay=5
max_attempts=180
attempt=0
success=0
while [ $attempt -lt $max_attempts ]; do
response=$(command "docker compose exec appwrite sh -c \"curl -I \$_APP_EXECUTOR_HOST/health -H \\"Authorization: Bearer \$_APP_EXECUTOR_SECRET\\"\")" || echo '0')
if echo $response | grep -q '200 OK'; then
success=1
break
else
echo "Health check failed, retrying..."
sleep $delay
((attempt++))
fi
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"
exit 1
echo "Failed to start Open Runtimes executor"
exit 1
fi
echo "Open Runtimes executor started"
- name: Run ${{ matrix.service }} tests with Project table mode
run: |
echo "Using project tables"
@@ -256,6 +259,32 @@ jobs:
docker compose up -d
sleep 30
- name: Wait for Open Runtimes
run: |
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"
- name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode
run: |
if [ "${{ matrix.tables-mode }}" == "Shared V1" ]; then