From a775f753dad0fa66dba847325de0497459e395cf Mon Sep 17 00:00:00 2001 From: Eduard van Valkenburg Date: Mon, 26 Aug 2024 13:47:46 +0200 Subject: [PATCH] Python: fix ollama integration test (#8364) ### Motivation and Context ### Description ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: --- .../workflows/python-integration-tests.yml | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-integration-tests.yml b/.github/workflows/python-integration-tests.yml index 97cba79a29b5..38b31dbfa847 100644 --- a/.github/workflows/python-integration-tests.yml +++ b/.github/workflows/python-integration-tests.yml @@ -207,29 +207,28 @@ jobs: - name: Install Ollama if: matrix.os == 'ubuntu-latest' run: | - curl -fsSL https://ollama.com/install.sh | sh - ollama serve & - sleep 5 - + if ${{ vars.OLLAMA_MODEL != '' }}; then + curl -fsSL https://ollama.com/install.sh | sh + ollama serve & + sleep 5 + fi - name: Pull model in Ollama if: matrix.os == 'ubuntu-latest' run: | - ollama pull ${{ vars.OLLAMA_MODEL }} - ollama list - + if ${{ vars.OLLAMA_MODEL != '' }}; then + ollama pull ${{ vars.OLLAMA_MODEL }} + ollama list + fi - name: Google auth uses: google-github-actions/auth@v2 with: project_id: ${{ vars.VERTEX_AI_PROJECT_ID }} credentials_json: ${{ secrets.VERTEX_AI_SERVICE_ACCOUNT_KEY }} - - name: Set up gcloud - uses: google-github-actions/setup-gcloud@v2 - + uses: google-github-actions/setup-gcloud@v2 - name: Setup Redis Stack Server if: matrix.os == 'ubuntu-latest' run: docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest - - name: Run Integration Tests id: run_tests shell: bash