16
16
17
17
steps :
18
18
- 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
+
19
36
- name : Run tests Neo4j 4
20
37
run : |
21
38
@@ -24,16 +41,14 @@ jobs:
24
41
25
42
docker compose -f docker-compose-neo4j-4.yml up -d --build --remove-orphans --wait neo4j
26
43
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
29
46
30
47
echo "PHP_VERSION=${{ matrix.php }}" > .env
31
48
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
32
49
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
37
52
38
53
tests-v5 :
39
54
runs-on : ubuntu-latest
@@ -44,20 +59,37 @@ jobs:
44
59
45
60
steps :
46
61
- 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
+
47
79
- name : Run tests Neo4j 5
48
80
run : |
49
81
echo "PHP_VERSION=${{ matrix.php }}" > .env
50
82
echo "CONNECTION=bolt://neo4j:testtest@neo4j" >> .env
51
83
52
84
docker compose up -d --build --remove-orphans --wait neo4j
53
85
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
56
88
57
89
echo "PHP_VERSION=${{ matrix.php }}" > .env
58
90
echo "CONNECTION=neo4j://neo4j:testtest@neo4j" >> .env
59
91
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
62
94
63
95
docker compose down --remove-orphans --volumes
0 commit comments