From 28faf7ce04cecba0a522bdf3db1b43e907535523 Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Tue, 9 Dec 2025 17:53:18 +0100 Subject: [PATCH 1/5] test: Add permission example test with running s3 file system --- .github/workflows/examples_tests.yml | 60 +++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/.github/workflows/examples_tests.yml b/.github/workflows/examples_tests.yml index f7cc278cb..ab0138d62 100644 --- a/.github/workflows/examples_tests.yml +++ b/.github/workflows/examples_tests.yml @@ -256,7 +256,7 @@ jobs: with: python-version: '3.11.x' - - name: Run Memify Tests + - name: Run Permissions Example env: ENV: 'dev' OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} @@ -269,6 +269,64 @@ jobs: EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} run: uv run python ./examples/python/permissions_example.py + + test-s3-permissions-example: # Make sure permission and multi-user mode work with S3 file system + name: Run Permissions Example + runs-on: ubuntu-22.04 + defaults: + run: + shell: bash + services: + postgres: # Using postgres to avoid storing and using SQLite from S3 + 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 repository + uses: actions/checkout@v4 + + - name: Cognee Setup + uses: ./.github/actions/cognee_setup + with: + python-version: '3.11.x' + extra-dependencies: "aws" + + - name: Run S3 Permissions Example + env: + ENV: 'dev' + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + 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 }} + STORAGE_BACKEND: 's3' + AWS_ENDPOINT_URL: https://s3-eu-west-1.amazonaws.com + AWS_REGION: eu-west-1 + DATA_ROOT_DIRECTORY: "s3://cognee-temp/cognee/data" + SYSTEM_ROOT_DIRECTORY: "s3://cognee-temp/cognee/system" + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + 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 ./examples/python/permissions_example.py + test_docling_add: name: Run Add with Docling Test runs-on: macos-15 From 032a74a409b6f6245a369680353c5d7ba4472035 Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Tue, 9 Dec 2025 17:56:34 +0100 Subject: [PATCH 2/5] chore: add postgres dependency for cicd test --- .github/workflows/examples_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/examples_tests.yml b/.github/workflows/examples_tests.yml index ab0138d62..14b065356 100644 --- a/.github/workflows/examples_tests.yml +++ b/.github/workflows/examples_tests.yml @@ -298,7 +298,7 @@ jobs: uses: ./.github/actions/cognee_setup with: python-version: '3.11.x' - extra-dependencies: "aws" + extra-dependencies: "postgres aws" - name: Run S3 Permissions Example env: From ab20443330bd047415698f4a2d81e3427dbc272c Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Wed, 10 Dec 2025 12:35:58 +0100 Subject: [PATCH 3/5] chore: Change s3 bucket for permission example --- .github/workflows/examples_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples_tests.yml b/.github/workflows/examples_tests.yml index 14b065356..3fd48523c 100644 --- a/.github/workflows/examples_tests.yml +++ b/.github/workflows/examples_tests.yml @@ -315,8 +315,8 @@ jobs: STORAGE_BACKEND: 's3' AWS_ENDPOINT_URL: https://s3-eu-west-1.amazonaws.com AWS_REGION: eu-west-1 - DATA_ROOT_DIRECTORY: "s3://cognee-temp/cognee/data" - SYSTEM_ROOT_DIRECTORY: "s3://cognee-temp/cognee/system" + DATA_ROOT_DIRECTORY: "s3://github-runner-cognee-tests/cognee/data" + SYSTEM_ROOT_DIRECTORY: "s3://github-runner-cognee-tests/cognee/system" AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} DB_PROVIDER: 'postgres' From 4d0f1328225f024059f52aaa00957743fc82aa26 Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Wed, 10 Dec 2025 16:22:40 +0100 Subject: [PATCH 4/5] chore: Remove AWS url --- .github/workflows/examples_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/examples_tests.yml b/.github/workflows/examples_tests.yml index 3fd48523c..1a3d868c4 100644 --- a/.github/workflows/examples_tests.yml +++ b/.github/workflows/examples_tests.yml @@ -313,7 +313,6 @@ jobs: EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }} EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} STORAGE_BACKEND: 's3' - AWS_ENDPOINT_URL: https://s3-eu-west-1.amazonaws.com AWS_REGION: eu-west-1 DATA_ROOT_DIRECTORY: "s3://github-runner-cognee-tests/cognee/data" SYSTEM_ROOT_DIRECTORY: "s3://github-runner-cognee-tests/cognee/system" From 7cf6f082835cd45962aacdeff1bfffcbc6cdebb6 Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Fri, 12 Dec 2025 15:29:21 +0100 Subject: [PATCH 5/5] chore: update test credentials --- .github/workflows/examples_tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples_tests.yml b/.github/workflows/examples_tests.yml index f8f3e5aa3..95a14c9ac 100644 --- a/.github/workflows/examples_tests.yml +++ b/.github/workflows/examples_tests.yml @@ -315,10 +315,12 @@ jobs: EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }} STORAGE_BACKEND: 's3' AWS_REGION: eu-west-1 + AWS_ENDPOINT_URL: https://s3-eu-west-1.amazonaws.com + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_DEV_USER_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_DEV_USER_SECRET_KEY }} + STORAGE_BUCKET_NAME: github-runner-cognee-tests DATA_ROOT_DIRECTORY: "s3://github-runner-cognee-tests/cognee/data" SYSTEM_ROOT_DIRECTORY: "s3://github-runner-cognee-tests/cognee/system" - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} DB_PROVIDER: 'postgres' DB_NAME: 'cognee_db' DB_HOST: '127.0.0.1'