From b179a772705387890de0154da56d4f2d397ec010 Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:46:08 +0200 Subject: [PATCH] feat: adds concurrent test to e2e --- .../workflows/concurrent_subprocess_tests.yml | 67 ------------------- .github/workflows/e2e_tests.yml | 54 +++++++++++++++ .github/workflows/test_suites.yml | 5 -- 3 files changed, 54 insertions(+), 72 deletions(-) delete mode 100644 .github/workflows/concurrent_subprocess_tests.yml diff --git a/.github/workflows/concurrent_subprocess_tests.yml b/.github/workflows/concurrent_subprocess_tests.yml deleted file mode 100644 index f0a5459fc..000000000 --- a/.github/workflows/concurrent_subprocess_tests.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Concurrent Subprocess Access Tests - -permissions: - contents: read - -on: - workflow_call: - inputs: - databases: - required: false - type: string - default: "all" - description: "Which vector databases to test (comma-separated list or 'all')" - -jobs: - run_concurrent_subprocess_access_test: - name: Concurrent Subprocess access test - runs-on: ubuntu-22.04 - if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'kuzu/pgvector/postgres') }} - services: - postgres: - image: pgvector/pgvector:pg17 - env: - POSTGRES_USER: cognee - POSTGRES_PASSWORD: cognee - POSTGRES_DB: cognee_db - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - steps: - - name: Check out - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Cognee Setup - uses: ./.github/actions/cognee_setup - with: - python-version: ${{ inputs.python-version }} - extra-dependencies: "postgres" - - - name: Dependencies already installed - run: echo "Dependencies already installed in setup" - - - name: Run Concurrent subprocess access test (Kuzu/Lancedb/Postgres) - env: - ENV: dev - LLM_MODEL: ${{ secrets.LLM_MODEL }} - LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} - LLM_API_KEY: ${{ secrets.LLM_API_KEY }} - LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} - EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} - EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} - EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} - EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} - GRAPH_DATABASE_PROVIDER: 'kuzu' - DB_PROVIDER: 'postgres' - DB_NAME: 'cognee_db' - DB_HOST: '127.0.0.1' - DB_PORT: 5432 - DB_USERNAME: cognee - DB_PASSWORD: cognee - run: uv run python ./cognee/tests/test_concurrent_subprocess_access.py diff --git a/.github/workflows/e2e_tests.yml b/.github/workflows/e2e_tests.yml index 3fe7a7992..a8dc65acf 100644 --- a/.github/workflows/e2e_tests.yml +++ b/.github/workflows/e2e_tests.yml @@ -264,3 +264,57 @@ jobs: EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} run: uv run python ./cognee/tests/test_edge_ingestion.py + + + run_concurrent_subprocess_access_test: + name: Concurrent Subprocess access test + runs-on: ubuntu-22.04 + if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'kuzu/pgvector/postgres') }} + services: + postgres: + image: pgvector/pgvector:pg17 + env: + POSTGRES_USER: cognee + POSTGRES_PASSWORD: cognee + POSTGRES_DB: cognee_db + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + steps: + - name: Check out + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Cognee Setup + uses: ./.github/actions/cognee_setup + with: + python-version: ${{ inputs.python-version }} + extra-dependencies: "postgres" + + - name: Dependencies already installed + run: echo "Dependencies already installed in setup" + + - name: Run Concurrent subprocess access test (Kuzu/Lancedb/Postgres) + env: + ENV: dev + LLM_MODEL: ${{ secrets.LLM_MODEL }} + LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} + LLM_API_KEY: ${{ secrets.LLM_API_KEY }} + LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} + EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} + EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }} + EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} + EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} + GRAPH_DATABASE_PROVIDER: 'kuzu' + DB_PROVIDER: 'postgres' + DB_NAME: 'cognee_db' + DB_HOST: '127.0.0.1' + DB_PORT: 5432 + DB_USERNAME: cognee + DB_PASSWORD: cognee + run: uv run python ./cognee/tests/test_concurrent_subprocess_access.py \ No newline at end of file diff --git a/.github/workflows/test_suites.yml b/.github/workflows/test_suites.yml index 567384f16..2f1bdebf0 100644 --- a/.github/workflows/test_suites.yml +++ b/.github/workflows/test_suites.yml @@ -22,11 +22,6 @@ jobs: uses: ./.github/workflows/basic_tests.yml secrets: inherit - concurrent-subprocess-tests: - name: Concurrent subprocess tests - uses: ./.github/workflows/concurrent_subprocess_tests.yml - secrets: inherit - e2e-tests: name: End-to-End Tests uses: ./.github/workflows/e2e_tests.yml