From 1cc7fd8452ea4c98b1c2c511c834f862924e669d Mon Sep 17 00:00:00 2001 From: Jan Range Date: Mon, 16 Dec 2024 18:25:52 +0100 Subject: [PATCH] fix neo4j host --- .github/workflows/test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e4c576..64c738d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,11 +21,17 @@ jobs: python3 -m pip install --upgrade pip python3 -m pip install poetry poetry install --with dev,sql,graph + - name: Wait for Neo4j service to be ready + run: | + until curl -s http://localhost:7474; do + echo "Waiting for Neo4j service to be ready..." + sleep 5 + done - name: Test with pytest env: NEO4J_USER: neo4j NEO4J_PASSWORD: your_password - NEO4J_HOST: localhost + NEO4J_HOST: neo4j NEO4J_PORT: 7687 run: | python3 -m poetry run pytest @@ -41,3 +47,8 @@ jobs: NEO4J_PASSWORD: your_password NEO4J_HOST: localhost NEO4J_PORT: 7687 + options: >- + --health-cmd="curl -f http://localhost:7474 || exit 1" + --health-interval=10s + --health-timeout=5s + --health-retries=5