From 151db6d29ad253612dcf189e7083362eb3113f78 Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Thu, 11 Dec 2025 16:30:17 +0100 Subject: [PATCH] feat: adds different python versions to the search db test run --- .github/workflows/search_db_tests.yml | 38 ++++++++++++++++++++------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/search_db_tests.yml b/.github/workflows/search_db_tests.yml index 118c1c06c..4b6f240c2 100644 --- a/.github/workflows/search_db_tests.yml +++ b/.github/workflows/search_db_tests.yml @@ -11,12 +11,21 @@ on: type: string default: "all" description: "Which vector databases to test (comma-separated list or 'all')" + python-versions: + required: false + type: string + default: '["3.10", "3.11", "3.12", "3.13"]' + description: "Python versions to test (JSON array)" jobs: run-kuzu-lance-sqlite-search-tests: - name: Search test for Kuzu/LanceDB/Sqlite + name: Search test for Kuzu/LanceDB/Sqlite (Python ${{ matrix.python-version }}) runs-on: ubuntu-22.04 if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'kuzu/lance/sqlite') }} + strategy: + matrix: + python-version: ${{ fromJSON(inputs.python-versions) }} + fail-fast: false steps: - name: Check out uses: actions/checkout@v4 @@ -26,7 +35,7 @@ jobs: - name: Cognee Setup uses: ./.github/actions/cognee_setup with: - python-version: ${{ inputs.python-version }} + python-version: ${{ matrix.python-version }} - name: Dependencies already installed run: echo "Dependencies already installed in setup" @@ -48,10 +57,13 @@ jobs: run: uv run python ./cognee/tests/test_search_db.py run-neo4j-lance-sqlite-search-tests: - name: Search test for Neo4j/LanceDB/Sqlite + name: Search test for Neo4j/LanceDB/Sqlite (Python ${{ matrix.python-version }}) runs-on: ubuntu-22.04 if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'neo4j/lance/sqlite') }} - + strategy: + matrix: + python-version: ${{ fromJSON(inputs.python-versions) }} + fail-fast: false steps: - name: Check out uses: actions/checkout@v4 @@ -61,7 +73,7 @@ jobs: - name: Cognee Setup uses: ./.github/actions/cognee_setup with: - python-version: ${{ inputs.python-version }} + python-version: ${{ matrix.python-version }} - name: Setup Neo4j with GDS uses: ./.github/actions/setup_neo4j @@ -91,9 +103,13 @@ jobs: run: uv run python ./cognee/tests/test_search_db.py run-kuzu-pgvector-postgres-search-tests: - name: Search test for Kuzu/PGVector/Postgres + name: Search test for Kuzu/PGVector/Postgres (Python ${{ matrix.python-version }}) runs-on: ubuntu-22.04 if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'kuzu/pgvector/postgres') }} + strategy: + matrix: + python-version: ${{ fromJSON(inputs.python-versions) }} + fail-fast: false services: postgres: image: pgvector/pgvector:pg17 @@ -117,7 +133,7 @@ jobs: - name: Cognee Setup uses: ./.github/actions/cognee_setup with: - python-version: ${{ inputs.python-version }} + python-version: ${{ matrix.python-version }} extra-dependencies: "postgres" - name: Dependencies already installed @@ -146,9 +162,13 @@ jobs: run: uv run python ./cognee/tests/test_search_db.py run-neo4j-pgvector-postgres-search-tests: - name: Search test for Neo4j/PGVector/Postgres + name: Search test for Neo4j/PGVector/Postgres (Python ${{ matrix.python-version }}) runs-on: ubuntu-22.04 if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'neo4j/pgvector/postgres') }} + strategy: + matrix: + python-version: ${{ fromJSON(inputs.python-versions) }} + fail-fast: false services: postgres: image: pgvector/pgvector:pg17 @@ -172,7 +192,7 @@ jobs: - name: Cognee Setup uses: ./.github/actions/cognee_setup with: - python-version: ${{ inputs.python-version }} + python-version: ${{ matrix.python-version }} extra-dependencies: "postgres" - name: Setup Neo4j with GDS