Feature/cog 4463 graph aware embeddings implement minimal graphdb in postgres #7068
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Suites | |
| permissions: | |
| contents: read | |
| packages: write | |
| on: | |
| push: | |
| branches: [ main, dev ] | |
| pull_request: | |
| branches: [ main, dev ] | |
| types: [opened, synchronize, reopened, labeled] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| RUNTIME__LOG_LEVEL: ERROR | |
| ENV: 'dev' | |
| jobs: | |
| # ── Build pre-baked CI container ────────────────────────────────────── | |
| build-ci-env: | |
| name: Build CI Environment | |
| runs-on: ubuntu-latest | |
| if: >- | |
| github.event_name == 'push' || github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name == github.repository) | |
| outputs: | |
| ci-image: ${{ steps.set-image.outputs.image }} | |
| steps: | |
| - name: Sparse checkout (deps only) | |
| uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| pyproject.toml | |
| uv.lock | |
| README.md | |
| Dockerfile.ci | |
| .dockerignore.ci | |
| sparse-checkout-cone-mode: false | |
| - name: Compute dep hash and image tag | |
| id: set-image | |
| run: | | |
| DEP_HASH=$(sha256sum pyproject.toml uv.lock | sha256sum | head -c 16) | |
| IMAGE="ghcr.io/${{ github.repository }}/ci-env:deps-${DEP_HASH}" | |
| echo "image=${IMAGE}" >> "$GITHUB_OUTPUT" | |
| echo "dep_hash=${DEP_HASH}" >> "$GITHUB_OUTPUT" | |
| echo "Image tag: ${IMAGE}" | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check if image already exists | |
| id: check | |
| run: | | |
| if docker manifest inspect "${{ steps.set-image.outputs.image }}" > /dev/null 2>&1; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| echo "Image already exists, skipping build." | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| echo "Image not found, will build." | |
| fi | |
| - name: Set up Docker Buildx | |
| if: steps.check.outputs.exists != 'true' | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push CI image | |
| if: steps.check.outputs.exists != 'true' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile.ci | |
| push: true | |
| tags: ${{ steps.set-image.outputs.image }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/ci-env:buildcache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/ci-env:buildcache,mode=max | |
| # ── Stage 0: fast, no deps ─────────────────────────────────────────── | |
| pre-test: | |
| name: basic checks | |
| uses: ./.github/workflows/pre_test.yml | |
| # ── Stage 1: core tests ────────────────────────────────────────────── | |
| basic-tests: | |
| name: Basic Tests | |
| uses: ./.github/workflows/basic_tests.yml | |
| needs: [ pre-test, build-ci-env ] | |
| if: ${{ !cancelled() && needs.pre-test.result == 'success' }} | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| e2e-tests: | |
| name: End-to-End Tests | |
| uses: ./.github/workflows/e2e_tests.yml | |
| needs: [ pre-test, build-ci-env ] | |
| if: ${{ !cancelled() && needs.pre-test.result == 'success' }} | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| cli-tests: | |
| name: CLI Tests | |
| uses: ./.github/workflows/cli_tests.yml | |
| needs: [ build-ci-env ] | |
| if: ${{ !cancelled() }} | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| # ── Stage 2: depends on basic + e2e ────────────────────────────────── | |
| slow-e2e-tests: | |
| name: Slow End-to-End Tests | |
| uses: ./.github/workflows/slow_e2e_tests.yml | |
| needs: [ e2e-tests, build-ci-env ] | |
| if: ${{ !cancelled() && needs.e2e-tests.result == 'success' }} | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| graph-db-tests: | |
| name: Graph Database Tests | |
| needs: [basic-tests, e2e-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' && needs.e2e-tests.result == 'success' }} | |
| uses: ./.github/workflows/graph_db_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| vector-db-tests: | |
| name: Vector DB Tests | |
| needs: [basic-tests, e2e-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' && needs.e2e-tests.result == 'success' }} | |
| uses: ./.github/workflows/vector_db_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| example-tests: | |
| name: Example Tests | |
| needs: [basic-tests, e2e-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' && needs.e2e-tests.result == 'success' }} | |
| uses: ./.github/workflows/examples_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| notebook-tests: | |
| name: Notebook Tests | |
| needs: [basic-tests, e2e-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' && needs.e2e-tests.result == 'success' }} | |
| uses: ./.github/workflows/notebooks_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| different-os-tests-basic: | |
| name: OS and Python Tests Ubuntu | |
| needs: [basic-tests, e2e-tests] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' }} | |
| uses: ./.github/workflows/test_different_operating_systems.yml | |
| with: | |
| python-versions: '["3.10.x", "3.11.x", "3.12.x", "3.13.x"]' | |
| os: '["ubuntu-22.04"]' | |
| secrets: inherit | |
| different-os-tests-extended: | |
| name: OS and Python Tests Extended | |
| needs: [basic-tests, e2e-tests] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' }} | |
| uses: ./.github/workflows/test_different_operating_systems.yml | |
| with: | |
| python-versions: '["3.13.x"]' | |
| os: '["macos-15", "windows-latest"]' | |
| secrets: inherit | |
| llm-tests: | |
| name: LLM Test Suite | |
| needs: [ basic-tests, e2e-tests, build-ci-env ] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' && needs.e2e-tests.result == 'success' }} | |
| uses: ./.github/workflows/test_llms.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| s3-file-storage-test: | |
| name: S3 File Storage Test | |
| needs: [basic-tests, e2e-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.basic-tests.result == 'success' && needs.e2e-tests.result == 'success' }} | |
| uses: ./.github/workflows/test_s3_file_storage.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| integration-tests: | |
| name: Run Integration Tests | |
| needs: [ build-ci-env ] | |
| if: ${{ !cancelled() }} | |
| uses: ./.github/workflows/integration_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| mcp-test: | |
| name: MCP Tests | |
| needs: [basic-tests, e2e-tests] | |
| uses: ./.github/workflows/test_mcp.yml | |
| secrets: inherit | |
| docker-compose-test: | |
| name: Docker Compose Test | |
| needs: [basic-tests, e2e-tests] | |
| uses: ./.github/workflows/docker_compose.yml | |
| secrets: inherit | |
| docker-ci-test: | |
| name: Docker CI test | |
| needs: [basic-tests, e2e-tests] | |
| uses: ./.github/workflows/backend_docker_build_test.yml | |
| secrets: inherit | |
| # ── Stage 3: depends on graph-db-tests ─────────────────────────────── | |
| temporal-graph-tests: | |
| name: Temporal Graph Test | |
| needs: [ basic-tests, e2e-tests, graph-db-tests, build-ci-env ] | |
| if: ${{ !cancelled() && needs.graph-db-tests.result == 'success' }} | |
| uses: ./.github/workflows/temporal_graph_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| search-db-tests: | |
| name: Search Test on Different DBs | |
| needs: [basic-tests, e2e-tests, graph-db-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.graph-db-tests.result == 'success' }} | |
| uses: ./.github/workflows/search_db_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| relational-db-migration-tests: | |
| name: Relational DB Migration Tests | |
| needs: [basic-tests, e2e-tests, graph-db-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.graph-db-tests.result == 'success' }} | |
| uses: ./.github/workflows/relational_db_migration_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| distributed-tests: | |
| name: Distributed Cognee Test | |
| needs: [ basic-tests, e2e-tests, graph-db-tests, build-ci-env ] | |
| if: ${{ !cancelled() && needs.graph-db-tests.result == 'success' }} | |
| uses: ./.github/workflows/distributed_test.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| # ── Stage 4: depends on stage 3 ───────────────────────────────────── | |
| db-examples-tests: | |
| name: DB Examples Tests | |
| needs: [vector-db-tests, graph-db-tests, relational-db-migration-tests, distributed-tests, build-ci-env] | |
| if: ${{ !cancelled() && needs.vector-db-tests.result == 'success' && needs.graph-db-tests.result == 'success' }} | |
| uses: ./.github/workflows/db_examples_tests.yml | |
| with: | |
| ci-image: ${{ needs.build-ci-env.outputs.ci-image || '' }} | |
| secrets: inherit | |
| # ── Final stage ────────────────────────────────────────────────────── | |
| ollama-tests: | |
| name: Ollama Tests | |
| needs: [ | |
| basic-tests, | |
| e2e-tests, | |
| graph-db-tests, | |
| notebook-tests, | |
| different-os-tests-basic, | |
| different-os-tests-extended, | |
| vector-db-tests, | |
| example-tests, | |
| llm-tests, | |
| mcp-test, | |
| relational-db-migration-tests, | |
| docker-compose-test, | |
| docker-ci-test, | |
| integration-tests, | |
| slow-e2e-tests, | |
| ] | |
| uses: ./.github/workflows/test_ollama.yml | |
| secrets: inherit | |
| # Ollama tests moved to the end | |
| llamacpp-tests: | |
| name: Llama-cpp Tests | |
| needs: [ | |
| basic-tests, | |
| e2e-tests, | |
| graph-db-tests, | |
| notebook-tests, | |
| different-os-tests-basic, | |
| different-os-tests-extended, | |
| vector-db-tests, | |
| example-tests, | |
| llm-tests, | |
| mcp-test, | |
| relational-db-migration-tests, | |
| docker-compose-test, | |
| docker-ci-test, | |
| ] | |
| uses: ./.github/workflows/test_llamacpp.yml | |
| secrets: inherit | |
| notify: | |
| name: Test Completion Status | |
| needs: [ | |
| basic-tests, | |
| e2e-tests, | |
| cli-tests, | |
| graph-db-tests, | |
| notebook-tests, | |
| different-os-tests-basic, | |
| different-os-tests-extended, | |
| vector-db-tests, | |
| example-tests, | |
| db-examples-tests, | |
| mcp-test, | |
| llm-tests, | |
| ollama-tests, | |
| llamacpp-tests, | |
| relational-db-migration-tests, | |
| docker-compose-test, | |
| docker-ci-test, | |
| integration-tests, | |
| slow-e2e-tests, | |
| ] | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| steps: | |
| - name: Check Status | |
| run: | | |
| if [[ "${{ needs.basic-tests.result }}" == "success" && | |
| "${{ needs.e2e-tests.result }}" == "success" && | |
| "${{ needs.cli-tests.result }}" == "success" && | |
| "${{ needs.graph-db-tests.result }}" == "success" && | |
| "${{ needs.notebook-tests.result }}" == "success" && | |
| "${{ needs.different-os-tests-basic.result }}" == "success" && | |
| "${{ needs.different-os-tests-extended.result }}" == "success" && | |
| "${{ needs.vector-db-tests.result }}" == "success" && | |
| "${{ needs.example-tests.result }}" == "success" && | |
| "${{ needs.db-examples-tests.result }}" == "success" && | |
| "${{ needs.relational-db-migration-tests.result }}" == "success" && | |
| "${{ needs.llm-tests.result }}" == "success" && | |
| "${{ needs.docker-compose-test.result }}" == "success" && | |
| "${{ needs.docker-ci-test.result }}" == "success" && | |
| "${{ needs.ollama-tests.result }}" == "success" && | |
| "${{ needs.integration-tests.result }}" == "success" && | |
| "${{ needs.slow-e2e-tests.result }}" == "success" ]]; then | |
| echo "All test suites completed successfully!" | |
| else | |
| echo "One or more test suites failed." | |
| exit 1 | |
| fi |