Hi all,
I am trying to setup a neo4j service in a GitHub action. For now, the action yml contains:
services:
# Label used to access the service container
neo4j:
# Docker Hub image
image: neo4j:latest
env:
# install GDS at startup
NEO4JLABS_PLUGINS: '["graph-data-science"]'
NEO4J_AUTH: neo4j/${{ secrets.NEO4J_PASSWORD }}
NEO4J_dbms_connector_bolt_advertised__address: localhost:7687
ports:
# Maps bolt port
- 7687:7687
[...]
steps:
[...]
- name: Test with pytest
env:
NEO4J_URI: "bolt://localhost:${{ job.services.postgres.ports[7687] }}"
NEO4J_PASSWORD: ${{ secrets.NEO4J_PASSWORD }}
run: |
pytest
(I have cut parts that seems irrelevant to me, but full file is here: https://github.com/stellasia/pygds/blob/master/.github/workflows/python-package.yml)
But most of the time, the tests fail with neo4j._exceptions.BoltHandshakeError: Connection to localhost:7687 closed without handshake response
(not always though) which makes me think that neo4j is not totally initialized when tests start, but I have no clue how to check this hypothesis and fix it if it turns to be true.
Has someone already run into the same issue?
Thanks!