Skip to content

Commit 920014a

Browse files
authored
ci: Update tests PHP version to 8.3 (#224)
ci: Update CI workflows and integration tests for PHP versions 8.1, and 8.3 Update names to use matrix values for PHP versions Add and adjust PHP_VERSION environment variables across workflows Update Docker Compose for compatibility with version 4.4 Populate .env files in single server and v5 test workflows for consistent environment setup
1 parent bc4b9e5 commit 920014a

8 files changed

+66
-20
lines changed

Diff for: .github/workflows/integration-test-cluster-neo4j-4.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,20 @@ on:
1111
jobs:
1212
tests:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [8.1, 8.3]
1417
env:
18+
PHP_VERSION: ${{ matrix.php }}
1519
CONNECTION: neo4j://neo4j:testtest@localhost:7688
16-
name: "Running on PHP 8.1 in a Neo4j 4.4 cluster"
20+
name: "Running on PHP ${{ matrix.php }} in a Neo4j 4.4 cluster"
1721

1822
steps:
1923
- uses: actions/checkout@v2
2024
- name: Populate .env
2125
run: |
22-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
26+
echo "PHP_VERSION=${{ matrix.php }}" > .env
27+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
2328
- uses: hoverkraft-tech/[email protected]
2429
name: Start services
2530
with:

Diff for: .github/workflows/integration-test-cluster-neo4j-5.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,20 @@ on:
1111
jobs:
1212
tests:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [8.1, 8.3]
1417
env:
18+
PHP_VERSION: ${{ matrix.php }}
1519
CONNECTION: neo4j://neo4j:testtest@localhost:7687
16-
name: "Running on PHP 8.1 with a Neo4j 5.20-enterprise cluster"
20+
name: "Running on PHP ${{ matrix.php }} with a Neo4j 5.20-enterprise cluster"
1721

1822
steps:
1923
- uses: actions/checkout@v2
2024
- name: Populate .env
2125
run: |
22-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
26+
echo "PHP_VERSION=${{ matrix.php }}" > .env
27+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
2328
- uses: hoverkraft-tech/[email protected]
2429
name: Start services
2530
with:

Diff for: .github/workflows/integration-test-single-server.yml

+36-10
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ on:
1111
jobs:
1212
tests-v4:
1313
runs-on: ubuntu-latest
14-
name: "Running on PHP 8.1 with a Neo4j 4 instance connecting over all available protocols"
14+
strategy:
15+
matrix:
16+
php: [8.1, 8.3]
17+
name: "Running on PHP ${{ matrix.php }} with a Neo4j 4 instance connecting over all available protocols"
1518

1619
steps:
1720
- uses: actions/checkout@v2
1821
- name: Populate .env
1922
run: |
20-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
23+
echo "PHP_VERSION=${{ matrix.php }}" > .env
24+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
2125
- uses: hoverkraft-tech/[email protected]
2226
name: Start services
2327
with:
@@ -28,22 +32,35 @@ jobs:
2832
docker compose run client composer install
2933
- name: Test neo4j://
3034
run: |
31-
docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
35+
docker compose run \
36+
-e PHP_VERSION=${{ matrix.php }} \
37+
-e CONNECTION=neo4j://neo4j:testtest@neo4j \
38+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
3239
- name: Test bolt://
3340
run: |
34-
docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
41+
docker compose run \
42+
-e PHP_VERSION=${{ matrix.php }} \
43+
-e CONNECTION=bolt://neo4j:testtest@neo4j \
44+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
3545
- name: Test http://
3646
run: |
37-
docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
47+
docker compose run \
48+
-e PHP_VERSION=${{ matrix.php }} \
49+
-e CONNECTION=http://neo4j:testtest@neo4j \
50+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
3851
tests-v5:
3952
runs-on: ubuntu-latest
40-
name: "Running on PHP 8.1 with a Neo4j 5 instance connecting over all available protocols"
53+
strategy:
54+
matrix:
55+
php: [8.1, 8.3]
56+
name: "Running on PHP ${{ matrix.php }} with a Neo4j 5 instance connecting over all available protocols"
4157

4258
steps:
4359
- uses: actions/checkout@v2
4460
- name: Populate .env
4561
run: |
46-
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
62+
echo "PHP_VERSION=${{ matrix.php }}" > .env
63+
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
4764
- uses: hoverkraft-tech/[email protected]
4865
name: Start services
4966
with:
@@ -54,10 +71,19 @@ jobs:
5471
docker compose run client composer install
5572
- name: Test neo4j://
5673
run: |
57-
docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
74+
docker compose run \
75+
-e PHP_VERSION=${{ matrix.php }} \
76+
-e CONNECTION=neo4j://neo4j:testtest@neo4j \
77+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
5878
- name: Test bolt://
5979
run: |
60-
docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
80+
docker compose run \
81+
-e PHP_VERSION=${{ matrix.php }} \
82+
-e CONNECTION=bolt://neo4j:testtest@neo4j \
83+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
6184
- name: Test http://
6285
run: |
63-
docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
86+
docker compose run \
87+
-e PHP_VERSION=${{ matrix.php }} \
88+
-e CONNECTION=http://neo4j:testtest@neo4j \
89+
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration

Diff for: .github/workflows/static-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: php-actions/composer@v6
2323
with:
2424
progress: yes
25-
php_version: 8.0
25+
php_version: 8.3
2626
version: 2
2727
- name: "PHP-CS-Fixer"
2828
run: vendor/bin/php-cs-fixer fix --dry-run

Diff for: .github/workflows/unit-test.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ on:
1111
jobs:
1212
tests:
1313
runs-on: ubuntu-latest
14-
name: "Running on PHP 8.1"
14+
name: "Running Unit Tests"
15+
strategy:
16+
matrix:
17+
php: ['8.1', '8.2', '8.3']
1518

1619
steps:
1720
- uses: actions/checkout@v2
@@ -23,12 +26,12 @@ jobs:
2326
- uses: php-actions/composer@v6
2427
with:
2528
progress: yes
26-
php_version: 8.1
29+
php_version: ${{ matrix.php }}
2730
version: 2
2831
- uses: php-actions/phpunit@v3
2932
with:
3033
configuration: phpunit.xml.dist
31-
php_version: 8.1
34+
php_version: ${{ matrix.php }}
3235
memory_limit: 1024M
3336
version: 10
3437
testsuite: Unit

Diff for: Dockerfile

+3-1
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 \

Diff for: docker-compose-neo4j-4.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ services:
3030
build:
3131
context: .
3232
dockerfile: Dockerfile
33+
args:
34+
PHP_VERSION: ${PHP_VERSION}
3335
networks:
3436
- neo4j
3537
volumes:
@@ -44,7 +46,8 @@ services:
4446
context: .
4547
dockerfile: Dockerfile
4648
args:
47-
- WITH_XDEBUG=true
49+
PHP_VERSION: ${PHP_VERSION}
50+
WITH_XDEBUG: true
4851
working_dir: /opt/project
4952
volumes:
5053
- .:/opt/project

Diff for: docker-compose.yml

+2
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)