Skip to content

Add ollamaEmbeddings test #12

Add ollamaEmbeddings test

Add ollamaEmbeddings test #12

name: ollama
on:
push:
workflow_dispatch:
jobs:
test-with-ollama:
strategy:
matrix:
node-version: [20.x, 22.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Ollama Docker image and pull gemma2:2b
run: |
mkdir -p ~/.ollama/models
docker run -d -v ollama:/home/runner/.ollama -p 11434:11434 --name ollama ollama/ollama
sleep 20
docker exec ollama ollama pull gemma2:2b
docker exec ollama ollama pull all-minilm:l6-v2
sleep 20
time curl -i http://localhost:11434
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm run test