Added docker-based testing environment for neo4j integration testing.

This commit is contained in:
jay
2026-09-09 09:22:48 -04:00
parent a3d1fcfabc
commit a857953a80
3 changed files with 56 additions and 5 deletions
+37
View File
@@ -0,0 +1,37 @@
services:
test:
image: golang:1.26
environment:
CGO_ENABLED: 1
NEO4J_USER: neo4j
NEO4J_PASS: heartwood
NEO4J_URI: bolt://neo4j:7687
working_dir: /app
volumes:
- ".:/app"
- go-mod-cache:/go/pkg/mod
- go-build-cache:/root/.cache/go-build
depends_on:
neo4j:
condition: service_healthy
restart: always
command: "tail -f /dev/null"
healthcheck:
test: ["CMD-SHELL", "go version | grep -q 'go version'"]
start_period: 20s
neo4j:
image: neo4j:5
environment:
- NEO4J_AUTH=neo4j/heartwood
restart: always
healthcheck:
test:
[
"CMD-SHELL",
"cypher-shell -u neo4j -p heartwood 'RETURN 1;' 2>/dev/null | grep -q '1'",
]
start_period: 20s
volumes:
go-mod-cache:
go-build-cache: