Setup dedicated CI to run the Ollama tests

This commit is contained in:
Kerollmops 2025-02-04 11:30:14 +01:00
parent 56438bdea4
commit a1d1e7c82a
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F

View File

@ -4,7 +4,7 @@ on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
# Everyday at 5:00am # Everyday at 5:00am
- cron: '0 5 * * *' - cron: "0 5 * * *"
pull_request: pull_request:
push: push:
# trying and staging branches are for Bors config # trying and staging branches are for Bors config
@ -89,6 +89,38 @@ jobs:
run: | run: |
cargo test --workspace --locked --release --features "$(cargo xtask list-features --exclude-feature cuda)" 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: test-disabled-tokenization:
name: Test disabled tokenization name: Test disabled tokenization
runs-on: ubuntu-latest runs-on: ubuntu-latest