name: Reusable Integration Tests permissions: contents: read packages: read on: workflow_call: inputs: ci-image: required: false type: string default: '' env: COGNEE_SKIP_CONNECTION_TEST: 'true' jobs: integration-retrieval: name: Integration - Retrieval (${{ matrix.split-group }}/4) runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: split-group: [1, 2, 3, 4] container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} env: ENV: 'dev' LLM_PROVIDER: openai 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 }} steps: - name: Check out repository uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "scraping fastembed" - name: Run Retrieval Tests run: uv run pytest cognee/tests/integration/retrieval/ --splits 4 --group ${{ matrix.split-group }} integration-documents-tasks: name: Integration - Documents & Tasks (${{ matrix.split-group }}/2) runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: split-group: [1, 2] container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} env: ENV: 'dev' LLM_PROVIDER: openai 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 }} steps: - name: Check out repository uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "scraping" - name: Run Document & Task Tests run: uv run pytest cognee/tests/integration/documents/ cognee/tests/integration/tasks/ --splits 2 --group ${{ matrix.split-group }} integration-infra: name: Integration - Infrastructure (${{ matrix.split-group }}/3) runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: split-group: [1, 2, 3] container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} env: ENV: 'dev' LLM_PROVIDER: openai 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 }} steps: - name: Check out repository uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' # fastembed so the embedding tokenizer delegation tests can import # FastembedEmbeddingEngine. extra-dependencies: "scraping fastembed" - name: Run Infrastructure Tests run: uv run pytest cognee/tests/integration/infrastructure/ --splits 3 --group ${{ matrix.split-group }} integration-web: name: Integration - Web 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 }} env: ENV: 'dev' LLM_PROVIDER: openai 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 }} steps: - name: Check out repository uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "scraping" - name: Run Web Integration Tests run: uv run pytest cognee/tests/integration/web_url_crawler/ integration-other: name: Integration - Deletion & Misc 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 container: ${{ inputs.ci-image != '' && fromJSON(format('{{"image":"{0}","credentials":{{"username":"{1}","password":"{2}"}}}}', inputs.ci-image, github.actor, github.token)) || null }} env: ENV: 'dev' LLM_PROVIDER: openai 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 }} CACHE_HOST: redis steps: - name: Check out repository uses: actions/checkout@v6 with: fetch-depth: 0 - name: Cognee Setup uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' extra-dependencies: "scraping redis" - name: Run Deletion & Misc Tests run: uv run pytest cognee/tests/integration/test_delete_edge_cases.py cognee/tests/integration/shared/