Skip to content

Commit 07c059e

Browse files
exaby73transistive
authored andcommitted
feat: Move all protocols tests to docker compose
1 parent 8234a54 commit 07c059e

File tree

1 file changed

+18
-30
lines changed

1 file changed

+18
-30
lines changed

.github/workflows/integration-test-single-server.yml

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,27 @@ on:
1111
jobs:
1212
tests:
1313
runs-on: ubuntu-latest
14-
name: "Running on PHP 8.2 with a Neo4j 5 instance connecting over all available protocols"
15-
16-
services:
17-
neo4j:
18-
image: neo4j:5
19-
env:
20-
NEO4J_AUTH: neo4j/testtest
21-
NEO4JLABS_PLUGINS: '["apoc"]'
22-
ports:
23-
- 7687:7687
24-
- 7474:7474
25-
options: >-
26-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
27-
--health-start-period "60s"
28-
--health-interval "30s"
29-
--health-timeout "15s"
30-
--health-retries "5"
14+
name: "Running on PHP 8.1 with a Neo4j 5 instance connecting over all available protocols"
3115

3216
steps:
3317
- uses: actions/checkout@v2
3418
- name: Cache Composer dependencies
35-
uses: actions/cache@v2
36-
with:
37-
path: /tmp/composer-cache
38-
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
39-
- uses: php-actions/composer@v6
19+
- name: Populate .env
20+
run: |
21+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
22+
- uses: hoverkraft-tech/[email protected]
4023
with:
41-
progress: yes
42-
php_version: 8.2
43-
version: 2
44-
- name: Test multiple connections
24+
compose-file: './docker-compose.yml'
25+
up-flags: '--build'
26+
- name: Composer install
27+
run: |
28+
docker compose run client composer install
29+
- name: Test neo4j://
30+
run: |
31+
docker compose run -e CONNECTION=neo4j://neo4j:testtest@localhost client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
32+
- name: Test bolt://
33+
run: |
34+
docker compose run -e CONNECTION=bolt://neo4j:testtest@localhost client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
35+
- name: Test http://
4536
run: |
46-
CONNECTION=neo4j://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
47-
CONNECTION=bolt://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
48-
CONNECTION=http://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
49-
wait
37+
docker compose run -e CONNECTION=http://neo4j:testtest@localhost client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration

0 commit comments

Comments
 (0)