From 52d41fa123bcf6acef81d0ef9bb053f3050efebc Mon Sep 17 00:00:00 2001 From: Anton Komarev Date: Sun, 1 Sep 2024 21:31:21 +0300 Subject: [PATCH] Add opentsdb to CI --- .github/workflows/tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a5983c6..4fffe88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,13 @@ jobs: - name: Wait for OpenTSDB to be ready run: | for i in {1..30}; do - curl -s http://opentsdb:4242/api/version && break || sleep 2 + response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4242/api/version) + if [ "$response" -eq 200 ]; then + echo "OpenTSDB is running!" + break + fi + echo "Waiting for OpenTSDB to be ready..." + sleep 2 done - name: Execute tests