diff --git a/.github/workflows/docker-compose-testing.yml b/.github/workflows/docker-compose-testing.yml index 9cbb0b749..1fb82c4bb 100644 --- a/.github/workflows/docker-compose-testing.yml +++ b/.github/workflows/docker-compose-testing.yml @@ -63,6 +63,7 @@ jobs: - name: Ping services timeout-minutes: 5 run: | + cd ./docker-compose chmod +x ./ping.sh ./ping.sh - name: Install node diff --git a/docker-compose/ping.sh b/docker-compose/ping.sh new file mode 100644 index 000000000..8ce2f9cf6 --- /dev/null +++ b/docker-compose/ping.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -eu pipefail +set echo off + +# functions +ping() +{ + local service=$1 + local port=$2 + shift; shift; + COMMENTS=$@ + echo "Pending $service-api" + until $(nc -zv localhost "$port"); do + printf '.' + sleep 5 + done + echo "$service-api livez!" +} + +# main +ping wallet 7001 +ping issuer 7002 +ping verifier 7003 \ No newline at end of file