From e5baeeedb6718397fd48e0cc78f501ab41026672 Mon Sep 17 00:00:00 2001 From: Stefano Fiorucci Date: Wed, 3 Jan 2024 16:20:57 +0100 Subject: [PATCH] try using a github service for Ollama --- .github/workflows/ollama.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ollama.yml b/.github/workflows/ollama.yml index 4d3360282..793943798 100644 --- a/.github/workflows/ollama.yml +++ b/.github/workflows/ollama.yml @@ -28,8 +28,17 @@ jobs: matrix: os: [ubuntu-latest] python-version: ["3.9","3.10","3.11"] - + services: + ollama: + image: ollama/ollama:latest + ports: + - 11434:11434 + options: --name ollama + steps: + - name: Pull the LLM in the Ollama service + run: docker exec ollama ollama pull ${{ env.LLM_FOR_TESTS }} + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -45,12 +54,6 @@ jobs: if: matrix.python-version == '3.9' run: hatch run lint:all - - name: Run Ollama container - working-directory: integrations/ollama - run: | - docker run -d -p 11434:11434 --name ollama ollama/ollama:latest - docker exec ollama ollama pull ${{ env.LLM_FOR_TESTS }} - - name: Run tests working-directory: integrations/ollama run: hatch run cov