mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-05-24 02:19:29 +00:00
Fix syntax
This commit is contained in:
parent
94ea03ac32
commit
09c4fa5300
19
.github/workflows/ci.yaml
vendored
19
.github/workflows/ci.yaml
vendored
@ -16,11 +16,10 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env: |
|
env:
|
||||||
URL="http://localhost:8081/api/codex/v1/debug/info"
|
URL: "http://localhost:8081/api/codex/v1/debug/info"
|
||||||
TIMEOUT_SECONDS=300
|
TIMEOUT_SECONDS: 300
|
||||||
SLEEP_INTERVAL=2
|
SLEEP_INTERVAL: 2
|
||||||
MAX_RETRIES=$((TIMEOUT_SECONDS / SLEEP_INTERVAL))
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -37,16 +36,18 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for first SP to be started
|
- name: Wait for first SP to be started
|
||||||
run: |
|
run: |
|
||||||
|
MAX_RETRIES=$((TIMEOUT_SECONDS / SLEEP_INTERVAL))
|
||||||
echo "Waiting for $URL (timeout: ${TIMEOUT_SECONDS}s)..."
|
echo "Waiting for $URL (timeout: ${TIMEOUT_SECONDS}s)..."
|
||||||
|
|
||||||
for i in $(seq 1 $MAX_RETRIES); do
|
for i in $(seq 1 $MAX_RETRIES); do
|
||||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
|
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
|
||||||
if [ "$STATUS" = "200" ]; then
|
if [ "$STATUS" = "200" ]; then
|
||||||
echo "Codex is ready"
|
echo "Codex is ready"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep $SLEEP_INTERVAL
|
echo "Waiting... HTTP status: $STATUS"
|
||||||
|
sleep $SLEEP_INTERVAL
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Timed out after ${TIMEOUT_SECONDS}s waiting for $URL"
|
echo "Timed out after ${TIMEOUT_SECONDS}s waiting for $URL"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user