92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
name: test | weaviate
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
RUNTIME__LOG_LEVEL: ERROR
|
|
|
|
jobs:
|
|
get_docs_changes:
|
|
name: docs changes
|
|
uses: ./.github/workflows/get_docs_changes.yml
|
|
|
|
setup_docker:
|
|
name: Set up Docker Buildx
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
run_weaviate_integration_test:
|
|
name: test
|
|
needs: get_docs_changes
|
|
if: needs.get_docs_changes.outputs.changes_outside_docs == 'true'
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:latest
|
|
env:
|
|
POSTGRES_USER: cognee
|
|
POSTGRES_PASSWORD: cognee
|
|
POSTGRES_DB: cognee_db
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- 5432:5432
|
|
|
|
steps:
|
|
- name: Check out
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11.x'
|
|
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1.3.2
|
|
with:
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
installer-parallel: true
|
|
|
|
- name: Install dependencies
|
|
run: poetry install --no-interaction
|
|
|
|
- name: Create .cognee_system directory and print path
|
|
run: |
|
|
mkdir .cognee_system
|
|
echo $(pwd)/.cognee_system
|
|
|
|
- name: Wait for PostgreSQL to be ready
|
|
run: |
|
|
echo "Waiting for PostgreSQL to be ready..."
|
|
until pg_isready -h localhost -p 5432 -U cognee; do
|
|
sleep 1
|
|
done
|
|
|
|
- name: Run default Weaviate
|
|
env:
|
|
ENV: 'dev'
|
|
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
VECTOR_DB_URL: ${{ secrets.WEAVIATE_API_URL }}
|
|
VECTOR_DB_KEY: ${{ secrets.WEAVIATE_API_KEY }}
|
|
DB_USER: cognee
|
|
DB_PASSWORD: cognee
|
|
DB_NAME: cognee_db
|
|
DB_HOST: localhost
|
|
DB_PORT: 5432
|
|
run: poetry run python ./cognee/tests/test_weaviate.py
|