Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
21 changes: 12 additions & 9 deletions .github/actions/setup-stellar/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,30 @@ 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..."

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.
echo "✅ Stellar Network is ready"
exit 0

if curl -s "${{ steps.env.outputs.friendbot }}" | grep -q '"status"\|"friendbot"'; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix doesn't really make sense. Is the output now indicating friendbot as a readiness signifier? If so, then let's remove status? Otherwise behaviour needs to be understood and clarified in the code

echo "✅ Stellar Network is ready"
exit 0
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