Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/actions/setup-stellar/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,41 @@ 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..."

echo "Checking if Stellar container is running..."
docker ps | grep stellar/quickstart || echo "⚠️ Stellar container not found in docker ps"

Comment thread
AttissNgo marked this conversation as resolved.
Outdated
while true; do
echo "Checking Friendbot: ${{ steps.env.outputs.friendbot }} ..."
if curl -s "${{ steps.env.outputs.friendbot }}" | grep -q '"status"'; then
Comment thread
AttissNgo marked this conversation as resolved.

RESPONSE=$(curl -s "${{ steps.env.outputs.friendbot }}" || echo "")

if [ -n "$RESPONSE" ]; then
echo "Got response from Friendbot: ${RESPONSE:0:100}..."
Comment thread
AttissNgo marked this conversation as resolved.
Outdated

if echo "$RESPONSE" | grep -q '"status"\|"friendbot"'; then
echo "✅ Stellar Network is ready"
exit 0
fi
else
echo "No response from Friendbot yet"
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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-stellar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down