From a1d1e7c82ac56e4e329c0ad2fdcabd244715ac98 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Tue, 4 Feb 2025 11:30:14 +0100 Subject: [PATCH] Setup dedicated CI to run the Ollama tests --- .github/workflows/test-suite.yml | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index fae93bd66..d615c1392 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: schedule: # Everyday at 5:00am - - cron: '0 5 * * *' + - cron: "0 5 * * *" pull_request: push: # trying and staging branches are for Bors config @@ -89,6 +89,38 @@ jobs: run: | cargo test --workspace --locked --release --features "$(cargo xtask list-features --exclude-feature cuda)" + ollama-ubuntu: + name: Test with Ollama + runs-on: ubuntu-latest + env: + MEILI_TEST_OLLAMA_SERVER: "http://localhost:11434" + steps: + - uses: actions/checkout@v1 + - name: Install Ollama + run: | + curl -fsSL https://ollama.com/install.sh | sudo -E sh + - name: Start serving + run: | + # Run it in the background, there is no way to daemonise at the moment + ollama serve & + + # A short pause is required before the HTTP port is opened + sleep 5 + + # This endpoint blocks until ready + time curl -i http://localhost:11434 + + - name: Pull nomic-embed-text & all-minilm + run: | + ollama pull nomic-embed-text + ollama pull all-minilm + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + args: --locked --release --all ollama + test-disabled-tokenization: name: Test disabled tokenization runs-on: ubuntu-latest