Skip to content

Commit 682a111

Browse files
committed
feat: Add CI workflows for 8.1 and 8.3
1 parent 7257bec commit 682a111

File tree

5 files changed

+49
-15
lines changed

5 files changed

+49
-15
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
tests:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [8.1, 8.3]
1417
env:
1518
CONNECTION: neo4j://neo4j:testtest@localhost:7688
1619
name: "Running on PHP 8.1 in a Neo4j 4.4 cluster"
@@ -19,7 +22,10 @@ jobs:
1922
- uses: actions/checkout@v2
2023
- name: Populate .env
2124
run: |
22-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
25+
echo <<<EOF > .env
26+
PHP_VERSION=${{ matrix.php }}
27+
CONNECTION=neo4j://neo4j:testtest@neo4j
28+
EOF
2329
- uses: hoverkraft-tech/[email protected]
2430
name: Start services
2531
with:

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
tests:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [8.1, 8.3]
1417
env:
1518
CONNECTION: neo4j://neo4j:testtest@localhost:7687
1619
name: "Running on PHP 8.1 with a Neo4j 5.20-enterprise cluster"
@@ -19,7 +22,10 @@ jobs:
1922
- uses: actions/checkout@v2
2023
- name: Populate .env
2124
run: |
22-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
25+
echo <<<EOF > .env
26+
PHP_VERSION=${{ matrix.php }}
27+
CONNECTION=neo4j://neo4j:testtest@neo4j
28+
EOF
2329
- uses: hoverkraft-tech/[email protected]
2430
name: Start services
2531
with:

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

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ on:
1111
jobs:
1212
tests-v4:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [8.1, 8.3]
1417
name: "Running on PHP 8.1 with a Neo4j 4 instance connecting over all available protocols"
1518

1619
steps:
1720
- uses: actions/checkout@v2
18-
- name: Populate .env
19-
run: |
20-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
2121
- uses: hoverkraft-tech/[email protected]
2222
name: Start services
2323
with:
@@ -28,22 +28,31 @@ jobs:
2828
docker compose run client composer install
2929
- name: Test neo4j://
3030
run: |
31-
docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
31+
docker compose run \
32+
-e PHP_VERSION=${{ matrix.php }} \
33+
-e CONNECTION=neo4j://neo4j:testtest@neo4j \
34+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
3235
- name: Test bolt://
3336
run: |
34-
docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
37+
docker compose run \
38+
-e PHP_VERSION=${{ matrix.php }} \
39+
-e CONNECTION=bolt://neo4j:testtest@neo4j \
40+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
3541
- name: Test http://
3642
run: |
37-
docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
43+
docker compose run \
44+
-e PHP_VERSION=${{ matrix.php }} \
45+
-e CONNECTION=http://neo4j:testtest@neo4j \
46+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
3847
tests-v5:
3948
runs-on: ubuntu-latest
49+
strategy:
50+
matrix:
51+
php: [8.1, 8.3]
4052
name: "Running on PHP 8.1 with a Neo4j 5 instance connecting over all available protocols"
4153

4254
steps:
4355
- uses: actions/checkout@v2
44-
- name: Populate .env
45-
run: |
46-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
4756
- uses: hoverkraft-tech/[email protected]
4857
name: Start services
4958
with:
@@ -54,10 +63,19 @@ jobs:
5463
docker compose run client composer install
5564
- name: Test neo4j://
5665
run: |
57-
docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
66+
docker compose run \
67+
-e PHP_VERSION=${{ matrix.php }} \
68+
-e CONNECTION=neo4j://neo4j:testtest@neo4j \
69+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
5870
- name: Test bolt://
5971
run: |
60-
docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
72+
docker compose run \
73+
-e PHP_VERSION=${{ matrix.php }} \
74+
-e CONNECTION=bolt://neo4j:testtest@neo4j \
75+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
6176
- name: Test http://
6277
run: |
63-
docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
78+
docker compose run \
79+
-e PHP_VERSION=${{ matrix.php }} \
80+
-e CONNECTION=http://neo4j:testtest@neo4j \
81+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM php:8.1-cli
1+
ARG PHP_VERSION
2+
3+
FROM php:${PHP_VERSION}-cli
24
RUN apt-get update \
35
&& apt-get install -y \
46
libzip-dev \

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ x-definitions:
2424
build:
2525
context: .
2626
dockerfile: Dockerfile
27+
args:
28+
PHP_VERSION: ${PHP_VERSION}
2729
volumes:
2830
- .:/opt/project
2931
x-common-cluster:

0 commit comments

Comments
 (0)