Skip to content

Commit 4a46f04

Browse files
exaby73transistive
authored andcommitted
feat: Remove service containers and use docker compose test action for Neo4J 5 tests
1 parent 03fe278 commit 4a46f04

File tree

2 files changed

+8
-104
lines changed

2 files changed

+8
-104
lines changed

.github/workflows/integration-test-cluster-neo4j-5.yml

Lines changed: 5 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -17,107 +17,9 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v2
20-
- name: Cache Composer dependencies
21-
uses: actions/cache@v2
20+
- uses: cloudposse/github-action-docker-compose-test-run@main
2221
with:
23-
path: /tmp/composer-cache
24-
key: ${{ runner.os }}-8.0-${{ hashFiles('**/composer.lock') }}
25-
- uses: php-actions/composer@v6
26-
with:
27-
progress: yes
28-
php_version: 8.1
29-
version: 2
30-
- uses: php-actions/phpunit@v3
31-
with:
32-
configuration: phpunit.xml.dist
33-
php_version: 8.1
34-
memory_limit: 1024M
35-
version: 10
36-
testsuite: Integration
37-
bootstrap: vendor/autoload.php
38-
39-
services:
40-
server1:
41-
image: neo4j:5.20-enterprise
42-
ports:
43-
- 7687:7687
44-
- 7473:7473
45-
- 7474:7474
46-
env:
47-
NEO4J_initial_server_mode__constraint: PRIMARY
48-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
49-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
50-
NEO4j_server_bolt_advertised_address: localhost:7687
51-
NEO4j_server_http_advertised_address: localhost:7474
52-
NEO4J_PLUGINS: '["apoc"]'
53-
NEO4J_AUTH: neo4j/testtest
54-
options: >-
55-
--hostname server1
56-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
57-
--health-start-period "60s"
58-
--health-interval "30s"
59-
--health-timeout "15s"
60-
--health-retries "5"
61-
server2:
62-
image: neo4j:5.20-enterprise
63-
ports:
64-
- 8687:7687
65-
- 8473:7473
66-
- 8474:7474
67-
env:
68-
NEO4J_initial_server_mode__constraint: PRIMARY
69-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
70-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
71-
NEO4j_server_bolt_advertised_address: localhost:8687
72-
NEO4j_server_http_advertised_address: localhost:8474
73-
NEO4J_PLUGINS: '["apoc"]'
74-
NEO4J_AUTH: neo4j/testtest
75-
options: >-
76-
--hostname server2
77-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
78-
--health-start-period "60s"
79-
--health-interval "30s"
80-
--health-timeout "15s"
81-
--health-retries "5"
82-
server3:
83-
image: neo4j:5.20-enterprise
84-
ports:
85-
- 9474:7474
86-
- 9473:7473
87-
- 9687:7687
88-
env:
89-
NEO4J_initial_server_mode__constraint: PRIMARY
90-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
91-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
92-
NEO4j_server_bolt_advertised_address: localhost:9687
93-
NEO4j_server_http_advertised_address: localhost:9474
94-
NEO4J_PLUGINS: '["apoc"]'
95-
NEO4J_AUTH: neo4j/testtest
96-
options: >-
97-
--hostname server3
98-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
99-
--health-start-period "60s"
100-
--health-interval "30s"
101-
--health-timeout "15s"
102-
--health-retries "5"
103-
read-server4:
104-
image: neo4j:5.20-enterprise
105-
ports:
106-
- 10474:7474
107-
- 10473:7473
108-
- 10687:7687
109-
env:
110-
NEO4J_initial_server_mode__constraint: SECONDARY
111-
NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000
112-
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
113-
NEO4j_server_bolt_advertised_address: localhost:10687
114-
NEO4j_server_http_advertised_address: localhost:10474
115-
NEO4J_PLUGINS: '["apoc"]'
116-
NEO4J_AUTH: neo4j/testtest
117-
options: >-
118-
--hostname read-server4
119-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
120-
--health-start-period "60s"
121-
--health-interval "30s"
122-
--health-timeout "15s"
123-
--health-retries "5"
22+
file: 'docker-compose.yml'
23+
registry: 'registry.hub.docker.com'
24+
service: 'client'
25+
command: './vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration'

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ x-definitions:
2424
build:
2525
context: .
2626
dockerfile: Dockerfile
27-
# image: neo4j-php-client:latest
2827
volumes:
2928
- .:/opt/project
3029
x-common-cluster:
@@ -48,6 +47,9 @@ services:
4847
- .:/opt/project
4948
env_file:
5049
- .env
50+
depends_on:
51+
neo4j:
52+
condition: service_healthy
5153
neo4j:
5254
<<: *common
5355
image: neo4j:5.20-community

0 commit comments

Comments
 (0)