diff --git a/.github/workflows/langfuse.yml b/.github/workflows/langfuse.yml index 5d56bcfd13..13b5175b8e 100644 --- a/.github/workflows/langfuse.yml +++ b/.github/workflows/langfuse.yml @@ -81,8 +81,6 @@ jobs: - name: Install Hatch run: pip install hatch - # TODO: Once this integration is properly typed, use hatch run test:types - # https://github.com/deepset-ai/haystack-core-integrations/issues/1771 - name: Lint if: matrix.python-version == '3.10' && runner.os == 'Linux' run: hatch run fmt-check && hatch run test:types diff --git a/.github/workflows/pinecone.yml b/.github/workflows/pinecone.yml index 99042a4979..238e072088 100644 --- a/.github/workflows/pinecone.yml +++ b/.github/workflows/pinecone.yml @@ -30,8 +30,6 @@ env: PYTHONUNBUFFERED: "1" FORCE_COLOR: "1" PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} - TEST_MATRIX_OS: '["ubuntu-latest"]' - TEST_MATRIX_PYTHON: '["3.10", "3.14"]' jobs: compute-test-matrix: @@ -40,13 +38,20 @@ jobs: run: working-directory: . outputs: - os: ${{ steps.set.outputs.os }} - python-version: ${{ steps.set.outputs.python-version }} + matrix: ${{ steps.set.outputs.matrix }} steps: - id: set run: | - echo 'os=${{ github.event_name == 'push' && '["ubuntu-latest"]' || env.TEST_MATRIX_OS }}' >> "$GITHUB_OUTPUT" - echo 'python-version=${{ github.event_name == 'push' && '["3.10"]' || env.TEST_MATRIX_PYTHON }}' >> "$GITHUB_OUTPUT" + if [ "${{ github.event_name }}" = "push" ]; then + echo 'matrix=[{"os":"ubuntu-latest","python-version":"3.10","INDEX_NAME":"index-310"}]' >> "$GITHUB_OUTPUT" + else + MATRIX='[' + # Pinecone tests are time expensive, so only test on Ubuntu + MATRIX+='{"os":"ubuntu-latest","python-version":"3.10","INDEX_NAME":"index-310"},' + MATRIX+='{"os":"ubuntu-latest","python-version":"3.14","INDEX_NAME":"index-313"}' + MATRIX+=']' + echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT" + fi run: name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} @@ -58,14 +63,7 @@ jobs: strategy: fail-fast: false matrix: - # Pinecone tests are time expensive, so only test on Ubuntu - os: ${{ fromJSON(needs.compute-test-matrix.outputs.os) }} - python-version: ${{ fromJSON(needs.compute-test-matrix.outputs.python-version) }} - include: - - python-version: "3.10" - INDEX_NAME: "index-310" - - python-version: "3.14" - INDEX_NAME: "index-313" + include: ${{ fromJSON(needs.compute-test-matrix.outputs.matrix) }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -78,8 +76,6 @@ jobs: - name: Install Hatch run: pip install hatch - # TODO: Once this integration is properly typed, use hatch run test:types - # https://github.com/deepset-ai/haystack-core-integrations/issues/1771 - name: Lint if: matrix.python-version == '3.10' && runner.os == 'Linux' run: hatch run fmt-check && hatch run test:types diff --git a/integrations/llama_cpp/tests/models/.gitignore b/integrations/llama_cpp/tests/models/.gitignore deleted file mode 100644 index d6b7ef32c8..0000000000 --- a/integrations/llama_cpp/tests/models/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/integrations/llama_cpp/tests/test_chat_generator.py b/integrations/llama_cpp/tests/test_chat_generator.py index fa06457d45..626cee8c45 100644 --- a/integrations/llama_cpp/tests/test_chat_generator.py +++ b/integrations/llama_cpp/tests/test_chat_generator.py @@ -34,7 +34,9 @@ @pytest.fixture def model_path(): - return Path(__file__).parent / "models" + path = Path.home() / ".cache" / "haystack_llama_cpp_tests" + path.mkdir(parents=True, exist_ok=True) + return path def get_current_temperature(location: Annotated[str, "The city and state, e.g. San Francisco, CA"]): diff --git a/integrations/llama_cpp/tests/test_generator.py b/integrations/llama_cpp/tests/test_generator.py index 23afe3be9c..e6dcd32929 100644 --- a/integrations/llama_cpp/tests/test_generator.py +++ b/integrations/llama_cpp/tests/test_generator.py @@ -19,7 +19,9 @@ @pytest.fixture def model_path(): - return Path(__file__).parent / "models" + path = Path.home() / ".cache" / "haystack_llama_cpp_tests" + path.mkdir(parents=True, exist_ok=True) + return path def download_file(file_link, filename, capsys):