Skip to content

Commit

Permalink
feat: Move all protocols tests to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
exaby73 committed Oct 9, 2024
1 parent 2a6c6f0 commit 7d321ac
Showing 1 changed file with 18 additions and 30 deletions.
48 changes: 18 additions & 30 deletions .github/workflows/integration-test-single-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,27 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
name: "Running on PHP 8.2 with a Neo4j 5 instance connecting over all available protocols"

services:
neo4j:
image: neo4j:5
env:
NEO4J_AUTH: neo4j/testtest
NEO4JLABS_PLUGINS: '["apoc"]'
ports:
- 7687:7687
- 7474:7474
options: >-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
--health-start-period "60s"
--health-interval "30s"
--health-timeout "15s"
--health-retries "5"
name: "Running on PHP 8.1 with a Neo4j 5 instance connecting over all available protocols"

steps:
- uses: actions/checkout@v2
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
- name: Populate .env
run: |
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" > .env
- uses: hoverkraft-tech/[email protected]
with:
progress: yes
php_version: 8.2
version: 2
- name: Test multiple connections
compose-file: './docker-compose.yml'
up-flags: '--build'
- name: Composer install
run: |
docker compose run client composer install
- name: Test neo4j://
run: |
docker compose run -e CONNECTION=neo4j://neo4j:testtest@localhost client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
- name: Test bolt://
run: |
docker compose run -e CONNECTION=bolt://neo4j:testtest@localhost client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
- name: Test http://
run: |
CONNECTION=neo4j://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
CONNECTION=bolt://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
CONNECTION=http://neo4j:testtest@localhost ./vendor/bin/phpunit --configuration=phpunit.xml.dist --testsuite=Integration & \
wait
docker compose run -e CONNECTION=http://neo4j:testtest@localhost client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration

0 comments on commit 7d321ac

Please sign in to comment.