From 67dafae0f492843d25580756900c1433eb5e17d3 Mon Sep 17 00:00:00 2001 From: Nick Mitchell Date: Wed, 18 Feb 2026 08:47:26 -0500 Subject: [PATCH] fix(ci): wait for ollama server readiness after install The ollama install script prints "API is now available" before the server actually accepts connections, causing intermittent test failures. Add a readiness poll after install to ensure the server is ready. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Nick Mitchell --- .github/workflows/core.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index efea555f..aeeca016 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -66,7 +66,13 @@ jobs: if [ "$RUNNER_OS" = "Linux" ]; then curl -fsSL https://ollama.com/install.sh | bash - # note: install.sh will start ollama as an systemd service, no need to start it ourselves (actively harmful -- port conflict) + # Wait for the server to actually be ready (install.sh starts it, but the + # "API is now available" message is printed before it accepts connections) + for i in $(seq 1 30); do + curl -sf http://localhost:11434/api/tags > /dev/null 2>&1 && break + [ "$i" = "30" ] && { echo "Ollama server failed to start"; exit 1; } + sleep 1 + done elif [ "$RUNNER_OS" = "macOS" ]; then brew update brew install ollama