diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3c5836f3..00b784ba 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -73,7 +73,8 @@ jobs: - name: run fs working-directory: . run: | - make e2e-server & + make e2e-server > /dev/null & + make probe-e2e env: PORT: 9000 diff --git a/Makefile b/Makefile index 5c69f4a6..131a4f1c 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,10 @@ start: stop: $(DOCKER_CLI) stop $(CONTAINER_NAME) -.PHONY: e2e +.PHONY: e2e-server e2e-server: - sh $(shell pwd)/scripts/run.sh + sh $(shell pwd)/scripts/run.sh + +.PHONY: probe-e2e +probe-e2e: + sh $(shell pwd)/scripts/probe.sh diff --git a/scripts/probe.sh b/scripts/probe.sh new file mode 100644 index 00000000..c85de2f8 --- /dev/null +++ b/scripts/probe.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +IP=127.0.0.1 +PORT=9000 + +while true; do + nc -zv ${IP} ${PORT} + if [[ "$?" == "0" ]]; then + exit 0 + fi + sleep 2 +done