feat: Simplify acquiring and resuing connections #343
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
tests-v4: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ["8.1.31", "8.3.17"] | |
name: "Running on PHP ${{ matrix.php }} with a Neo4j 4 instance connecting over all available protocols" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Populate .env | |
run: | | |
echo "PHP_VERSION=${{ matrix.php }}" > .env | |
- name: Cache PHP deps | |
id: cache-php-deps | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }} | |
restore-keys: | | |
${{ runner.os }}-php-${{ matrix.php }}- | |
- name: Install PHP deps | |
if: steps.cache-php-deps.outputs.cache-hit != 'true' | |
run: docker compose run --rm client composer install | |
- name: Run tests Neo4j 4 | |
run: | | |
echo "PHP_VERSION=${{ matrix.php }}" > .env | |
echo "CONNECTION=bolt://neo4j:testtest@neo4j" >> .env | |
docker compose -f docker-compose-neo4j-4.yml up -d --build --remove-orphans --wait neo4j | |
docker compose -f docker-compose-neo4j-4.yml run --rm \ | |
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration | |
echo "PHP_VERSION=${{ matrix.php }}" > .env | |
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env | |
docker compose -f docker-compose-neo4j-4.yml run --rm \ | |
client phpunit.xml.dist --testsuite Integration | |
tests-v5: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ["8.1.31", "8.3.17"] | |
name: "Running on PHP ${{ matrix.php }} with a Neo4j 5 instance connecting over all available protocols" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Populate .env | |
run: | | |
echo "PHP_VERSION=${{ matrix.php }}" > .env | |
- name: Cache PHP deps | |
id: cache-php-deps | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }} | |
restore-keys: | | |
${{ runner.os }}-php-${{ matrix.php }}- | |
- name: Install PHP deps | |
if: steps.cache-php-deps.outputs.cache-hit != 'true' | |
run: docker compose run --rm client composer install | |
- name: Run tests Neo4j 5 | |
run: | | |
echo "PHP_VERSION=${{ matrix.php }}" > .env | |
echo "CONNECTION=bolt://neo4j:testtest@neo4j" >> .env | |
docker compose up -d --build --remove-orphans --wait neo4j | |
docker compose run --rm \ | |
client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration | |
echo "PHP_VERSION=${{ matrix.php }}" > .env | |
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env | |
docker compose run --rm \ | |
client /vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration | |
docker compose down --remove-orphans --volumes |