diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 369531ea5..77e72efa1 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -116,8 +116,28 @@ jobs: run: brew test --verbose eturnal - name: Start eturnal service run: brew services start eturnal - - name: Wait shortly - run: sleep 10 + - name: Check if eturnal is up & running ... + run: | + max_iterations=60 + iterations=0 + while true + do + iterations="$(expr $iterations + 1)" + echo ">> Attempt $iterations from $max_iterations" + sleep 1 + + if [ "$(eturnalctl ping)" = 'pong' ]; then + echo '>> eturnal is running! ...' + break + fi + + if [ "$iterations" -ge "$max_iterations" ]; then + echo '>> Loop Timeout!' + exit 1 + fi + done + - name: Print eturnal info + run: eturnalctl info - name: Create test credentials run: $(brew --prefix)/opt/eturnal/bin/eturnalctl credentials - name: Test eturnalctl on $PATH