From 73dd6c26b8ad8ec8d7deec612e4973deb1907d1c Mon Sep 17 00:00:00 2001 From: Vasilije <8619304+Vasilije1990@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:58:13 +0200 Subject: [PATCH] Fix to neo4j flow --- .github/workflows/test_neo4j.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/test_neo4j.yml b/.github/workflows/test_neo4j.yml index fa6e30e27..e2236f9e3 100644 --- a/.github/workflows/test_neo4j.yml +++ b/.github/workflows/test_neo4j.yml @@ -28,6 +28,18 @@ jobs: 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@v2 @@ -44,6 +56,13 @@ jobs: virtualenvs-in-project: true installer-parallel: true + - 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: Install dependencies run: poetry install --no-interaction @@ -60,4 +79,9 @@ jobs: GRAPH_DATABASE_PASSWORD: ${{ secrets.NEO4J_API_KEY }} GRAPH_DATABASE_USERNAME: "neo4j" ENV: 'dev' + POSTGRES_USER: cognee + POSTGRES_PASSWORD: cognee + POSTGRES_DB: cognee_db + POSTGRES_HOST: localhost + POSTGRES_PORT: 5432 run: poetry run python ./cognee/tests/test_neo4j.py