Skip to content

tweak

tweak #9

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
docker exec ollama ollama pull gemma2:2b
sleep 5
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