<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin --------- Co-authored-by: Daniel Molnar <soobrosa@gmail.com> Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com> Co-authored-by: Igor Ilic <igorilic03@gmail.com>
159 lines
4.7 KiB
YAML
159 lines
4.7 KiB
YAML
name: Reusable Integration Tests
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
python-version:
|
|
required: false
|
|
type: string
|
|
default: '3.11.x'
|
|
secrets:
|
|
LLM_MODEL:
|
|
required: true
|
|
LLM_ENDPOINT:
|
|
required: true
|
|
LLM_API_KEY:
|
|
required: true
|
|
LLM_API_VERSION:
|
|
required: true
|
|
EMBEDDING_MODEL:
|
|
required: true
|
|
EMBEDDING_ENDPOINT:
|
|
required: true
|
|
EMBEDDING_API_KEY:
|
|
required: true
|
|
EMBEDDING_API_VERSION:
|
|
required: true
|
|
OPENAI_API_KEY:
|
|
required: true
|
|
GRAPHISTRY_USERNAME:
|
|
required: true
|
|
GRAPHISTRY_PASSWORD:
|
|
required: true
|
|
|
|
jobs:
|
|
run-server-start-test:
|
|
name: Server Start Test
|
|
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: Run Server Tests
|
|
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 }}
|
|
run: poetry run python ./cognee/tests/test_cognee_server_start.py
|
|
|
|
run-telemetry-test:
|
|
name: Run Telemetry Test
|
|
runs-on: ubuntu-22.04
|
|
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 Telemetry Tests
|
|
env:
|
|
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 }}
|
|
run: poetry run python ./cognee/tests/test_telemetry.py
|
|
|
|
run-telemetry-pipeline-test:
|
|
name: Run Telemetry Pipeline Test
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- 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_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 }}
|
|
run: poetry run python ./cognee/tests/test_library.py
|
|
|
|
run-deduplication-test:
|
|
name: Deduplication Test
|
|
runs-on: ubuntu-latest
|
|
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@v4
|
|
|
|
- name: Cognee Setup
|
|
uses: ./.github/actions/cognee_setup
|
|
with:
|
|
python-version: '3.11.x'
|
|
|
|
- name: Install specific db dependency
|
|
run: |
|
|
poetry install -E postgres
|
|
|
|
- name: Run Deduplication Example
|
|
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 }}
|
|
run: poetry run python ./cognee/tests/test_deduplication.py
|