1616
1717 steps :
1818 - uses : actions/checkout@v4
19+ - name : Populate .env
20+ run : |
21+ echo "PHP_VERSION=${{ matrix.php }}" > .env
22+
23+ - name : Cache PHP deps
24+ id : cache-php-deps
25+ uses : actions/cache@v4
26+ with :
27+ path : vendor
28+ key : ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
29+ restore-keys : |
30+ ${{ runner.os }}-php-${{ matrix.php }}-
31+
32+ - name : Install PHP deps
33+ if : steps.cache-php-deps.outputs.cache-hit != 'true'
34+ run : docker compose run --rm client composer install
35+
1936 - name : Run tests Neo4j 4
2037 run : |
2138
@@ -24,16 +41,14 @@ jobs:
2441
2542 docker compose -f docker-compose-neo4j-4.yml up -d --build --remove-orphans --wait neo4j
2643
27- docker compose -f docker-compose-neo4j-4.yml run --rm --no-deps \
28- client sh -c "composer install && ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration"
44+ docker compose -f docker-compose-neo4j-4.yml run --rm \
45+ client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
2946
3047 echo "PHP_VERSION=${{ matrix.php }}" > .env
3148 echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
3249
33- docker compose -f docker-compose-neo4j-4.yml run --rm --no-deps \
34- client sh -c "./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration"
35-
36- docker compose -f docker-compose-neo4j-4.yml down --remove-orphans --volumes
50+ docker compose -f docker-compose-neo4j-4.yml run --rm \
51+ client phpunit.xml.dist --testsuite Integration
3752
3853 tests-v5 :
3954 runs-on : ubuntu-latest
@@ -44,20 +59,37 @@ jobs:
4459
4560 steps :
4661 - uses : actions/checkout@v4
62+ - name : Populate .env
63+ run : |
64+ echo "PHP_VERSION=${{ matrix.php }}" > .env
65+
66+ - name : Cache PHP deps
67+ id : cache-php-deps
68+ uses : actions/cache@v4
69+ with :
70+ path : vendor
71+ key : ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
72+ restore-keys : |
73+ ${{ runner.os }}-php-${{ matrix.php }}-
74+
75+ - name : Install PHP deps
76+ if : steps.cache-php-deps.outputs.cache-hit != 'true'
77+ run : docker compose run --rm client composer install
78+
4779 - name : Run tests Neo4j 5
4880 run : |
4981 echo "PHP_VERSION=${{ matrix.php }}" > .env
5082 echo "CONNECTION=bolt://neo4j:testtest@neo4j" >> .env
5183
5284 docker compose up -d --build --remove-orphans --wait neo4j
5385
54- docker compose run --rm --no-deps \
55- client sh -c "composer install && ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration"
86+ docker compose run --rm \
87+ client ./vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
5688
5789 echo "PHP_VERSION=${{ matrix.php }}" > .env
5890 echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
5991
60- docker compose run --rm --no-deps \
61- client sh -c ". /vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration"
92+ docker compose run --rm \
93+ client /vendor/bin/phpunit -c phpunit.xml.dist --testsuite Integration
6294
6395 docker compose down --remove-orphans --volumes
0 commit comments