From 546d553803ef8546b6aa6a195b2dc2ea7b8d0012 Mon Sep 17 00:00:00 2001 From: Jun Siang Cheah Date: Tue, 7 May 2024 06:13:57 +0800 Subject: [PATCH] fix: wait for Ollama to come up in integration test --- .github/workflows/integration-test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 32c331654..32346d3b9 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -20,7 +20,16 @@ jobs: - name: Build and run Compose Stack run: | - docker compose up --detach --build + docker compose --file docker-compose.yaml --file docker-compose.api.yaml up --detach --build + + - name: Wait for Ollama to be up + timeout-minutes: 5 + run: | + until curl --output /dev/null --silent --fail http://localhost:11434; do + printf '.' + sleep 1 + done + echo "Service is up!" - name: Preload Ollama model run: |