feat: Simplify acquiring and resuing connections #330
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: 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 --no-deps \ | |
client sh -c "composer install && ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration" | |
docker compose -f docker-compose-neo4j-4.yml run --rm --no-deps \ | |
client sh -c "composer install && ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration" | |
docker compose -f docker-compose-neo4j-4.yml down --remove-orphans --volumes | |
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 | |
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env | |
- 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 --no-deps \ | |
client sh -c "composer install && ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration" | |
docker compose run --rm --no-deps \ | |
client sh -c "composer install && ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration" | |
docker compose down --remove-orphans --volumes |