Skip to content

Client enhancement

Client enhancement #76

name: Integration Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
env:
CONNECTION: neo4j://neo4j:testtest@localhost:7688
name: "Running on PHP 8.0 with a Neo4j 5.10-enterprise cluster"
steps:
- uses: actions/checkout@v2
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-8.0-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
with:
progress: yes
php_version: 8.0
version: 2
- uses: php-actions/phpunit@v3
with:
configuration: phpunit.xml.dist
php_version: 8.0
memory_limit: 1024M
version: 9
testsuite: Integration
bootstrap: vendor/autoload.php
services:
server1:
image: neo4j:5.10-enterprise
ports:
- 7687:7687
- 7473:7473
- 7474:7474
env:
NEO4J_initial_server_mode__constraint: PRIMARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:7687
NEO4j_server_http_advertised_address: localhost:7474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
--health-start-period "60s"
--health-interval "30s"
--health-timeout "15s"
--health-retries "5"
server2:
image: neo4j:5.10-enterprise
ports:
- 8687:7687
- 8473:7473
- 8474:7474
env:
NEO4J_initial_server_mode__constraint: PRIMARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:8687
NEO4j_server_http_advertised_address: localhost:8474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
--health-start-period "60s"
--health-interval "30s"
--health-timeout "15s"
--health-retries "5"
server3:
image: neo4j:5.10-enterprise
ports:
- 9474:7474
- 9473:7473
- 9687:7687
env:
NEO4J_initial_server_mode__constraint: PRIMARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:9687
NEO4j_server_http_advertised_address: localhost:9474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
--health-start-period "60s"
--health-interval "30s"
--health-timeout "15s"
--health-retries "5"
read-server4:
image: neo4j:5.10-enterprise
ports:
- 10474:7474
- 10473:7473
- 10687:7687
env:
NEO4J_initial_server_mode__constraint: SECONDARY
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
NEO4j_server_bolt_advertised_address: localhost:10687
NEO4j_server_http_advertised_address: localhost:10474
NEO4J_PLUGINS: '["apoc"]'
NEO4J_AUTH: neo4j/testtest
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
--health-start-period "60s"
--health-interval "30s"
--health-timeout "15s"
--health-retries "5"