diff --git a/.github/workflows/integration-test-cluster-neo4j-4.yml b/.github/workflows/integration-test-cluster-neo4j-4.yml index 62ebd992..f835e40d 100644 --- a/.github/workflows/integration-test-cluster-neo4j-4.yml +++ b/.github/workflows/integration-test-cluster-neo4j-4.yml @@ -11,15 +11,20 @@ on: jobs: tests: runs-on: ubuntu-latest + strategy: + matrix: + php: [8.1, 8.3] env: + PHP_VERSION: ${{ matrix.php }} CONNECTION: neo4j://neo4j:testtest@localhost:7688 - name: "Running on PHP 8.1 in a Neo4j 4.4 cluster" + name: "Running on PHP ${{ matrix.php }} in a Neo4j 4.4 cluster" steps: - uses: actions/checkout@v2 - name: Populate .env run: | - echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env + echo "PHP_VERSION=${{ matrix.php }}" > .env + echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env - uses: hoverkraft-tech/compose-action@v2.0.2 name: Start services with: diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 37588031..43d19227 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -11,15 +11,20 @@ on: jobs: tests: runs-on: ubuntu-latest + strategy: + matrix: + php: [8.1, 8.3] env: + PHP_VERSION: ${{ matrix.php }} CONNECTION: neo4j://neo4j:testtest@localhost:7687 - name: "Running on PHP 8.1 with a Neo4j 5.20-enterprise cluster" + name: "Running on PHP ${{ matrix.php }} with a Neo4j 5.20-enterprise cluster" steps: - uses: actions/checkout@v2 - name: Populate .env run: | - echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env + echo "PHP_VERSION=${{ matrix.php }}" > .env + echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env - uses: hoverkraft-tech/compose-action@v2.0.2 name: Start services with: diff --git a/.github/workflows/integration-test-single-server.yml b/.github/workflows/integration-test-single-server.yml index aa47b687..bb8e65b3 100644 --- a/.github/workflows/integration-test-single-server.yml +++ b/.github/workflows/integration-test-single-server.yml @@ -11,13 +11,17 @@ on: jobs: tests-v4: runs-on: ubuntu-latest - name: "Running on PHP 8.1 with a Neo4j 4 instance connecting over all available protocols" + strategy: + matrix: + php: [8.1, 8.3] + name: "Running on PHP ${{ matrix.php }} with a Neo4j 4 instance connecting over all available protocols" steps: - uses: actions/checkout@v2 - name: Populate .env run: | - echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env + echo "PHP_VERSION=${{ matrix.php }}" > .env + echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env - uses: hoverkraft-tech/compose-action@v2.0.2 name: Start services with: @@ -28,22 +32,35 @@ jobs: docker compose run client composer install - name: Test neo4j:// run: | - docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration + docker compose run \ + -e PHP_VERSION=${{ matrix.php }} \ + -e CONNECTION=neo4j://neo4j:testtest@neo4j \ + client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration - name: Test bolt:// run: | - docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration + docker compose run \ + -e PHP_VERSION=${{ matrix.php }} \ + -e CONNECTION=bolt://neo4j:testtest@neo4j \ + client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration - name: Test http:// run: | - docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration + docker compose run \ + -e PHP_VERSION=${{ matrix.php }} \ + -e CONNECTION=http://neo4j:testtest@neo4j \ + client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration tests-v5: runs-on: ubuntu-latest - name: "Running on PHP 8.1 with a Neo4j 5 instance connecting over all available protocols" + strategy: + matrix: + php: [8.1, 8.3] + name: "Running on PHP ${{ matrix.php }} with a Neo4j 5 instance connecting over all available protocols" steps: - uses: actions/checkout@v2 - name: Populate .env run: | - echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env + echo "PHP_VERSION=${{ matrix.php }}" > .env + echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env - uses: hoverkraft-tech/compose-action@v2.0.2 name: Start services with: @@ -54,10 +71,19 @@ jobs: docker compose run client composer install - name: Test neo4j:// run: | - docker compose run -e CONNECTION=neo4j://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration + docker compose run \ + -e PHP_VERSION=${{ matrix.php }} \ + -e CONNECTION=neo4j://neo4j:testtest@neo4j \ + client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration - name: Test bolt:// run: | - docker compose run -e CONNECTION=bolt://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration + docker compose run \ + -e PHP_VERSION=${{ matrix.php }} \ + -e CONNECTION=bolt://neo4j:testtest@neo4j \ + client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration - name: Test http:// run: | - docker compose run -e CONNECTION=http://neo4j:testtest@neo4j client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration + docker compose run \ + -e PHP_VERSION=${{ matrix.php }} \ + -e CONNECTION=http://neo4j:testtest@neo4j \ + client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4bb579df..be9a04fc 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -22,7 +22,7 @@ jobs: - uses: php-actions/composer@v6 with: progress: yes - php_version: 8.0 + php_version: 8.3 version: 2 - name: "PHP-CS-Fixer" run: vendor/bin/php-cs-fixer fix --dry-run diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index dcd945d0..5dfe5b82 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -11,7 +11,10 @@ on: jobs: tests: runs-on: ubuntu-latest - name: "Running on PHP 8.1" + name: "Running Unit Tests" + strategy: + matrix: + php: ['8.1', '8.2', '8.3'] steps: - uses: actions/checkout@v2 @@ -23,12 +26,12 @@ jobs: - uses: php-actions/composer@v6 with: progress: yes - php_version: 8.1 + php_version: ${{ matrix.php }} version: 2 - uses: php-actions/phpunit@v3 with: configuration: phpunit.xml.dist - php_version: 8.1 + php_version: ${{ matrix.php }} memory_limit: 1024M version: 10 testsuite: Unit diff --git a/Dockerfile b/Dockerfile index 8f6d2797..bfc3ad73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM php:8.1-cli +ARG PHP_VERSION + +FROM php:${PHP_VERSION}-cli RUN apt-get update \ && apt-get install -y \ libzip-dev \ diff --git a/docker-compose-neo4j-4.yml b/docker-compose-neo4j-4.yml index ce6bda62..aee57ad1 100644 --- a/docker-compose-neo4j-4.yml +++ b/docker-compose-neo4j-4.yml @@ -30,6 +30,8 @@ services: build: context: . dockerfile: Dockerfile + args: + PHP_VERSION: ${PHP_VERSION} networks: - neo4j volumes: @@ -44,7 +46,8 @@ services: context: . dockerfile: Dockerfile args: - - WITH_XDEBUG=true + PHP_VERSION: ${PHP_VERSION} + WITH_XDEBUG: true working_dir: /opt/project volumes: - .:/opt/project diff --git a/docker-compose.yml b/docker-compose.yml index 5be247b6..5a3dd6cb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,6 +24,8 @@ x-definitions: build: context: . dockerfile: Dockerfile + args: + PHP_VERSION: ${PHP_VERSION} volumes: - .:/opt/project x-common-cluster: