Add ollamaEmbeddings test #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |