mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Simplify YML file
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#!/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"
|
||||
@@ -172,29 +172,7 @@ jobs:
|
||||
|
||||
- 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"
|
||||
sh .github/scripts/ensure-executor.sh
|
||||
|
||||
- name: Run ${{ matrix.service }} tests with Project table mode
|
||||
run: |
|
||||
@@ -261,29 +239,7 @@ jobs:
|
||||
|
||||
- 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"
|
||||
sh .github/scripts/ensure-executor.sh
|
||||
|
||||
- name: Run ${{ matrix.service }} tests with ${{ matrix.tables-mode }} table mode
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user