name: Reusable Integration Tests permissions: contents: read packages: read on: workflow_call: inputs: python-version: required: false type: string default: '3.11.x' ci-image: required: false type: string default: '' secrets: LLM_MODEL: required: true LLM_ENDPOINT: required: true LLM_API_KEY: required: true LLM_ARGS: required: false LLM_API_VERSION: required: true EMBEDDING_MODEL: required: true EMBEDDING_API_KEY: required: true OPENAI_API_KEY: required: true AWS_ACCESS_KEY_ID: required: true AWS_SECRET_ACCESS_KEY: required: true env: COGNEE_SKIP_CONNECTION_TEST: 'true' jobs: run-server-start-test: name: Server Start Test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Server Tests env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_cognee_server_start.py run-telemetry-test: name: Run Telemetry Test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Telemetry Tests env: LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_telemetry.py run-telemetry-pipeline-test: name: Run Telemetry Pipeline Test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Add telemetry identifier run: | echo "test-machine" > .anon_id - name: Run default basic pipeline with telemetry on env: ENV: 'local' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_library.py run-pipeline-error-propagation-test: name: Pipeline Error Propagation Test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run pipeline error propagation test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_pipeline_error_propagation.py run-cogx-roundtrip-test: name: COGX Roundtrip Test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run COGX roundtrip test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_cogx_roundtrip.py run-external-source-import-test: name: External Source Import Test (Zep export -> COGX import -> search) runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run external source import test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_external_source_import.py run-deduplication-test: name: Deduplication Test runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres" - name: Run Deduplication Example env: ENV: 'dev' LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} # Test needs OpenAI endpoint to handle multimedia LLM_ARGS: ${{ secrets.LLM_ARGS }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} run: uv run python ./cognee/tests/test_deduplication.py run-s3-bucket-test: name: S3 Bucket Test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "aws" - name: Run S3 Bucket Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: uv run python ./cognee/tests/test_s3.py test-parallel-databases: name: Test using different async databases in parallel in Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Dependencies already installed run: echo "Dependencies already installed in setup" - name: Run parallel databases test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_parallel_databases.py test-dataset-database-handler: name: Test dataset database handlers in Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run dataset databases handler test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_dataset_database_handler.py test-dataset-database-deletion: name: Test dataset database deletion in Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run dataset databases deletion test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_dataset_delete.py test-dataset-deletion-when-left-empty: name: Test dataset deletion when last piece of data deleted runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v4 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run dataset deletion test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_data_and_dataset_if_empty.py test-permissions: name: Test permissions with different situations in Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Dependencies already installed run: echo "Dependencies already installed in setup" - name: Run permissions test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run pytest cognee/tests/test_permissions.py -v --log-level=INFO test-agent-memory: name: Test agent memory end-to-end in Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Dependencies already installed run: echo "Dependencies already installed in setup" - name: Run agent memory e2e test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} ENABLE_BACKEND_ACCESS_CONTROL: "True" run: uv run pytest cognee/tests/test_agent_memory_e2e.py -v --log-level=INFO test-multi-tenancy: name: Test multi tenancy with different situations in Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run multi tenancy test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_multi_tenancy.py test-data-label: name: Test adding of label for data in Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run custom data label test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_custom_data_label.py test-delete-permission: name: Test delete permission assigned from dataset owner runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v4 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run delete persmission test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_permission.py test-deletion-on-default-graph: name: Delete default graph data test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run deletion on default graph env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_default_graph.py test-deletion-on-default-graph-non-mocked: name: Delete default graph data test (non-mocked) runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run deletion on default graph non mocked env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_default_graph_non_mocked.py test-deletion-on-custom-graph: name: Delete custom graph data test runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run deletion on custom graph env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_custom_graph.py test-delete-two-documents-empty-store: name: Delete two documents, verify incremental empty store (Ladybug/LanceDB) runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run two-document incremental delete (Ladybug/LanceDB) env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_two_documents_empty_store.py test-delete-two-documents-empty-store-postgres: name: Delete two documents, verify incremental empty store (Postgres + PGVector) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres" - name: Run two-document incremental delete (Postgres graph + PGVector + Postgres relational) env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'postgres' GRAPH_DATABASE_NAME: 'cognee_db' GRAPH_DATABASE_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} GRAPH_DATABASE_PORT: 5432 GRAPH_DATABASE_USERNAME: cognee GRAPH_DATABASE_PASSWORD: cognee VECTOR_DB_PROVIDER: 'pgvector' VECTOR_DB_NAME: 'cognee_db' VECTOR_DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} VECTOR_DB_PORT: 5432 VECTOR_DB_USERNAME: cognee VECTOR_DB_PASSWORD: cognee DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee run: uv run python ./cognee/tests/test_delete_two_documents_empty_store.py test-delete-two-documents-empty-store-neo4j: name: Delete two documents, verify incremental empty store (Neo4j/LanceDB) runs-on: ubuntu-22.04 steps: - name: Check out uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Setup Neo4j with GDS uses: ./.github/actions/setup_neo4j id: neo4j - name: Run two-document incremental delete (Neo4j graph + LanceDB) env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: "neo4j" GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }} GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }} GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }} # Neo4j Community has no multi-database support, so run single-tenant # (one shared graph). The graph-native provenance delete under test is # independent of per-dataset isolation. ENABLE_BACKEND_ACCESS_CONTROL: 'false' run: uv run python ./cognee/tests/test_delete_two_documents_empty_store.py # Neo4j jobs - NO container (uses setup_neo4j docker action) test-deletion-on-default-graph_with_legacy_data_1_neo4j: name: Delete default graph with legacy data test 1 in Neo4j case runs-on: ubuntu-22.04 steps: - name: Check out uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Setup Neo4j with GDS uses: ./.github/actions/setup_neo4j id: neo4j - name: Run delete dataset test in Neo4j case env: ENV: 'dev' ENABLE_BACKEND_ACCESS_CONTROL: false LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: "neo4j" GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }} GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }} GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }} ENABLE_AUTO_MIGRATIONS: 'false' run: uv run python ./cognee/tests/test_delete_default_graph_with_legacy_data_1.py test-deletion-on-default-graph_with_legacy_data_2: name: Delete default graph with legacy data test 2 runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v4 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run deletion on custom graph env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} ENABLE_AUTO_MIGRATIONS: 'false' run: uv run python ./cognee/tests/test_delete_default_graph_with_legacy_data_2.py test-delete-two-users-with-legacy-data: name: Delete data from two users operating on different datasets runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run delete test with two users with legacy data env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} ENABLE_AUTO_MIGRATIONS: 'false' run: uv run python ./cognee/tests/test_delete_two_users_with_legacy_data.py test-delete-two-users-on-same-dataset: name: Delete data from two users operating on same dataset runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run delete test with two users operating on same dataset env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_two_users_same_dataset.py test-delete-dataset-default: name: Delete dataset in Kuzu graph case runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run delete dataset test in Kuzu case env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_delete_dataset_ladybug.py # Neo4j job - NO container (uses setup_neo4j docker action) test-delete-dataset-neo4j: name: Delete dataset in Neo4j graph case runs-on: ubuntu-22.04 steps: - name: Check out uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Setup Neo4j with GDS uses: ./.github/actions/setup_neo4j id: neo4j - name: Run delete dataset test in Neo4j case env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: "neo4j" GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }} GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }} GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }} run: uv run python ./cognee/tests/test_delete_dataset_neo4j.py test-graph-edges: name: Test graph edge ingestion runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Dependencies already installed run: echo "Dependencies already installed in setup" - name: Run graph edges test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_edge_ingestion.py run_concurrent_subprocess_access_test: name: Concurrent Subprocess access test runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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 redis: image: redis:7 ports: - 6379:6379 options: >- --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres redis" - name: Run Concurrent subprocess access test (Kuzu/Lancedb/Postgres/Redis) env: ENV: dev LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' CACHING: true CACHE_BACKEND: 'redis' CACHE_HOST: ${{ inputs.ci-image != '' && 'redis' || 'localhost' }} SHARED_KUZU_LOCK: true DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee run: uv run python ./cognee/tests/test_concurrent_subprocess_access.py test-entity-extraction: name: Test Entity Extraction runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Dependencies already installed run: echo "Dependencies already installed in setup" - name: Run Entity Extraction Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/tasks/entity_extraction/entity_extraction_test.py run_conversation_sessions_test_redis: name: Conversation sessions test (Redis) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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 redis: image: redis:7 ports: - 6379:6379 options: >- --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres redis" - name: Run Conversation session tests (Redis) env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' CACHING: true AUTO_FEEDBACK: true CACHE_BACKEND: 'redis' CACHE_HOST: ${{ inputs.ci-image != '' && 'redis' || 'localhost' }} DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee run: uv run python ./cognee/tests/test_conversation_history.py run_conversation_sessions_test_fs: name: Conversation sessions test (FS) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres" - name: Run Conversation session tests (FS) env: ENV: dev LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' CACHING: true AUTO_FEEDBACK: true CACHE_BACKEND: 'fs' DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee run: uv run python ./cognee/tests/test_conversation_history.py run_conversation_sessions_test_postgres: name: Conversation sessions test (Postgres) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash 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: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres" - name: Run Conversation session tests (Postgres) env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' CACHING: true AUTO_FEEDBACK: true CACHE_BACKEND: 'postgres' DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee run: uv run python ./cognee/tests/test_conversation_history.py run_conversation_sessions_test_sqlite: name: Conversation sessions test (SQLite) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash steps: - name: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Conversation session tests (SQLite) env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' CACHING: true AUTO_FEEDBACK: true CACHE_BACKEND: 'sqlite' run: uv run python ./cognee/tests/test_conversation_history.py run-feedback-weights-pipeline-smoke-kuzu: name: Feedback Weights Pipeline Smoke Test (Kuzu) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres" - name: Run feedback weights pipeline smoke test (Kuzu) env: ENV: dev LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' CACHING: true AUTO_FEEDBACK: false CACHE_BACKEND: 'fs' DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee run: uv run python ./cognee/tests/test_feedback_weights_memify_pipeline.py run-feedback-weights-pipeline-smoke-neo4j: name: Feedback Weights Pipeline Smoke Test (Neo4j) runs-on: ubuntu-22.04 steps: - name: Check out uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Setup Neo4j with GDS uses: ./.github/actions/setup_neo4j id: neo4j - name: Run feedback weights pipeline smoke test (Neo4j) env: ENV: dev LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: "neo4j" GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }} GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }} GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }} CACHING: true AUTO_FEEDBACK: false CACHE_BACKEND: 'fs' ENABLE_BACKEND_ACCESS_CONTROL: false run: uv run python ./cognee/tests/test_feedback_weights_memify_pipeline.py run-feedback-weights-pipeline-smoke-kuzu-redis: name: Feedback Weights Pipeline Smoke Test (Kuzu + Redis) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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 redis: image: redis:7 ports: - 6379:6379 options: >- --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres redis" - name: Run feedback weights pipeline smoke test (Kuzu + Redis) env: ENV: dev LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' CACHING: true AUTO_FEEDBACK: false CACHE_BACKEND: 'redis' CACHE_HOST: ${{ inputs.ci-image != '' && 'redis' || 'localhost' }} DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee run: uv run python ./cognee/tests/test_feedback_weights_memify_pipeline.py run-feedback-weights-pipeline-smoke-neo4j-redis: name: Feedback Weights Pipeline Smoke Test (Neo4j + Redis) runs-on: ubuntu-22.04 services: redis: image: redis:7 ports: - 6379:6379 options: >- --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 5 steps: - name: Check out uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "redis" - name: Setup Neo4j with GDS uses: ./.github/actions/setup_neo4j id: neo4j - name: Run feedback weights pipeline smoke test (Neo4j + Redis) env: ENV: dev ENABLE_BACKEND_ACCESS_CONTROL: false LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: "neo4j" GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }} GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }} GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }} CACHING: true AUTO_FEEDBACK: false CACHE_BACKEND: 'redis' CACHE_HOST: 'localhost' run: uv run python ./cognee/tests/test_feedback_weights_memify_pipeline.py run-pipeline-cache-test: name: Test Pipeline Caching runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Pipeline Cache Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/test_pipeline_cache.py run-graph-model-from-schema-test: name: Test Graph Model Generation From Schema runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Graph Model Generation From Schema Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} # Single-user E2E flow; calls visualize_graph() with no dataset. ENABLE_BACKEND_ACCESS_CONTROL: false run: uv run python ./cognee/tests/test_graph_model_from_schema.py run-custom-model-test: name: Test Custom Model Cognify runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Custom Model Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} # Single-user E2E flow; calls visualize_graph() with no dataset. ENABLE_BACKEND_ACCESS_CONTROL: false run: uv run python ./cognee/tests/test_custom_model.py run-dataset-queue-test: name: Test Dataset Queues Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Test Dataset Queues Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} DATASET_QUEUE_ENABLED: "True" run: uv run python ./cognee/tests/e2e/dataset_queue/test_queue_serialization_e2e.py run-dataset-queue-buildup-test: name: Test Dataset Queue Buildup Cognee runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Test Dataset Queue Buildup Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} DATASET_QUEUE_ENABLED: "True" DATABASE_MAX_LRU_CACHE_SIZE: "1" run: uv run pytest cognee/tests/e2e/dataset_queue/test_dataset_queue_buildup.py run_usage_logger_test: name: Usage logger test (API/MCP) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: redis: image: redis:7 ports: - 6379:6379 options: >- --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "redis" - name: Install cognee-mcp and override with local cognee shell: bash run: | # 1. Install MCP (this will pull cognee from PyPI as a dependency) uv pip install -e ./cognee-mcp # 2. Force-install the local root to overwrite the PyPI version # This replaces the PyPI 'cognee' with your current branch code uv pip install --force-reinstall -e . - name: Run api/tool usage logger env: ENV: dev LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} GRAPH_DATABASE_PROVIDER: 'kuzu' USAGE_LOGGING: true CACHE_BACKEND: 'redis' CACHE_HOST: ${{ inputs.ci-image != '' && 'redis' || 'localhost' }} run: | uv run pytest cognee/tests/test_usage_logger_e2e.py -v --log-level=INFO || { echo "Usage logger test failed; retrying failed tests once." uv run pytest cognee/tests/test_usage_logger_e2e.py -v --log-level=INFO --lf } run_conditional_auth_test: name: Conditional Authentication Test runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Conditional Authentication Test env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} ENABLE_BACKEND_ACCESS_CONTROL: "false" run: uv run python ./cognee/tests/api/test_conditional_authentication_endpoints.py run_backend_auth_tests: name: Backend Authentication Tests runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Backend Authentication Tests env: ENV: 'dev' LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run python ./cognee/tests/api/test_backend_auth.py run_agent_endpoint_tests: name: Agent Endpoint Tests runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Agent Endpoint Tests env: ENV: 'dev' run: uv run pytest cognee/tests/api/test_agent_endpoints.py -v run_agent_mode_tests: name: Agent Mode Tests runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Agent Mode Tests env: ENV: 'dev' run: uv run pytest cognee/tests/api/test_agent_mode.py -v run_agent_e2e_tests: name: Agent E2E Tests runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Agent E2E Tests env: ENV: 'dev' run: uv run pytest cognee/tests/api/test_agents_e2e.py -v run_agent_registry_tests: name: Agent Registry Tests runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash steps: - name: Check out uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Agent Registry Tests env: ENV: 'dev' run: uv run pytest cognee/tests/unit/modules/agents/test_agent_registry.py -v backwards-compatibility-sqlite: name: Backwards compatibility — SQLite + LanceDB + Kuzu runs-on: ubuntu-22.04 env: COGNEE_COMPATIBILITY_TEST_VERSION: v0.5.6 ENV: dev LLM_PROVIDER: ${{ secrets.LLM_PROVIDER }} LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_PROVIDER: ${{ secrets.EMBEDDING_PROVIDER }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_DIMENSIONS: 300 steps: - name: Check out current branch uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python 3.11 uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install uv uses: astral-sh/setup-uv@v4 with: enable-cache: true # Save test scripts — they won't exist on the legacy version tag - name: Save compatibility test scripts run: cp -r cognee/tests/backwards_compatibility /tmp/compat_scripts # ── Phase 1: legacy version ──────────────────────────────────────────── - name: Switch to cognee ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }} run: git checkout ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }} - name: Install cognee ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }} dependencies run: uv sync --extra api --extra docs --extra dev - name: "Phase 1 — add, cognify, search (cognee ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }})" run: uv run python /tmp/compat_scripts/phase1_seed.py # ── Alembic migrations ───────────────────────────────────────────────── - name: Switch back to current branch run: git checkout ${{ github.sha }} - name: Install current branch dependencies run: uv sync --extra api --extra docs --extra dev - name: Run Alembic migrations (current branch schema → legacy version databases) working-directory: cognee run: uv run alembic upgrade head # ── Phase 2: current branch ──────────────────────────────────────────── - name: "Phase 2 — search legacy version data, then add, cognify, search (current branch)" run: uv run python cognee/tests/backwards_compatibility/phase2_verify.py backwards-compatibility-postgres: name: Backwards compatibility — PostgreSQL + PGVector + Kuzu runs-on: ubuntu-22.04 services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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 env: COGNEE_COMPATIBILITY_TEST_VERSION: v0.5.6 # Relational DB — PostgreSQL DB_PROVIDER: postgres DB_HOST: localhost DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee DB_NAME: cognee_db # Vector DB — PGVector (same postgres instance) VECTOR_DB_PROVIDER: pgvector VECTOR_DB_HOST: localhost VECTOR_DB_PORT: 5432 VECTOR_DB_USERNAME: cognee VECTOR_DB_PASSWORD: cognee VECTOR_DATASET_DATABASE_HANDLER: "pgvector" ENV: dev LLM_PROVIDER: ${{ secrets.LLM_PROVIDER }} LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_PROVIDER: ${{ secrets.EMBEDDING_PROVIDER }} EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_DIMENSIONS: 300 steps: - name: Check out current branch uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python 3.11 uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install uv uses: astral-sh/setup-uv@v4 with: enable-cache: true # Save test scripts — they won't exist on the legacy version tag - name: Save compatibility test scripts run: cp -r cognee/tests/backwards_compatibility /tmp/compat_scripts # ── Phase 1: legacy version ──────────────────────────────────────────── - name: Switch to cognee ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }} run: git checkout ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }} - name: Install cognee ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }} dependencies (with postgres extra) run: uv sync --extra api --extra docs --extra dev --extra postgres - name: "Phase 1 — add, cognify, search (cognee ${{ env.COGNEE_COMPATIBILITY_TEST_VERSION }} / postgres)" run: uv run python /tmp/compat_scripts/phase1_seed.py # ── Alembic migrations ───────────────────────────────────────────────── - name: Switch back to current branch run: git checkout ${{ github.sha }} - name: Install current branch dependencies (with postgres extra) run: uv sync --extra api --extra docs --extra dev --extra postgres - name: Run Alembic migrations (current branch schema → legacy version databases) working-directory: cognee run: uv run alembic upgrade head # ── Phase 2: current branch ──────────────────────────────────────────── - name: "Phase 2 — search legacy version data, then add, cognify, search (current branch)" run: uv run python cognee/tests/backwards_compatibility/phase2_verify.py test-adapter-caching: name: Test Vector and Graph Adapter Caching uses: ./.github/workflows/adapter_caching_tests.yml with: python-version: ${{ inputs.python-version }} ci-image: ${{ inputs.ci-image }} secrets: inherit # ── Performance Analysis Tests ───────────────────────────────────────────── performance-test-sqlite-lancedb-ladybug: name: Performance Test (SQLite + LanceDB + LadyBug) runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Run Performance Analysis Test env: ENV: 'dev' run: uv run pytest cognee/tests/test_performance_analysis.py -v performance-test-postgres-pgvector: name: Performance Test (PostgreSQL + PGVector + PostgresGraph) runs-on: ubuntu-latest container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} defaults: run: shell: bash services: postgres: image: ghcr.io/topoteretes/pgvector:pg17 credentials: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} 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 repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "postgres" - name: Run Performance Analysis Test env: ENV: 'dev' DB_PROVIDER: 'postgres' DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} DB_PORT: 5432 DB_USERNAME: cognee DB_PASSWORD: cognee DB_NAME: cognee_db VECTOR_DB_PROVIDER: 'pgvector' VECTOR_DB_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} VECTOR_DB_PORT: 5432 VECTOR_DB_USERNAME: cognee VECTOR_DB_PASSWORD: cognee VECTOR_DATASET_DATABASE_HANDLER: 'pgvector' GRAPH_DATABASE_PROVIDER: 'postgres' GRAPH_DATABASE_USERNAME: cognee GRAPH_DATABASE_PASSWORD: cognee GRAPH_DATABASE_HOST: ${{ inputs.ci-image != '' && 'postgres' || '127.0.0.1' }} GRAPH_DATABASE_PORT: 5432 GRAPH_DATABASE_NAME: "cognee_db" run: uv run pytest cognee/tests/test_performance_analysis.py -v performance-test-neo4j: name: Performance Test (SQLite + Neo4j + LanceDB) runs-on: ubuntu-22.04 steps: - name: Check out repository uses: actions/checkout@master - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Setup Neo4j with GDS uses: ./.github/actions/setup_neo4j id: neo4j - name: Run Performance Analysis Test env: ENV: 'dev' ENABLE_BACKEND_ACCESS_CONTROL: false GRAPH_DATABASE_PROVIDER: "neo4j" GRAPH_DATABASE_URL: ${{ steps.neo4j.outputs.neo4j-url }} GRAPH_DATABASE_USERNAME: ${{ steps.neo4j.outputs.neo4j-username }} GRAPH_DATABASE_PASSWORD: ${{ steps.neo4j.outputs.neo4j-password }} run: uv run pytest cognee/tests/test_performance_analysis.py -v test-concurrent-cognify: name: Concurrent cognify on one dataset end-to-end (SQLite + LanceDB) runs-on: ubuntu-22.04 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} steps: - name: Check out repository uses: actions/checkout@v6 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - name: Dependencies already installed run: echo "Dependencies already installed in setup" - name: Run concurrent cognify e2e test env: ENV: 'dev' ENABLE_BACKEND_ACCESS_CONTROL: "True" LLM_MODEL: ${{ secrets.LLM_MODEL }} LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }} LLM_API_KEY: ${{ secrets.LLM_API_KEY }} LLM_ARGS: ${{ secrets.LLM_ARGS }} LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }} EMBEDDING_DIMENSIONS: 300 EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }} EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} run: uv run pytest cognee/tests/test_concurrent_cognify_e2e.py -v --log-level=INFO