Skip to content

Commit 44adf79

Browse files
committed
split workflow into three
1 parent 49efde4 commit 44adf79

File tree

3 files changed

+62
-20
lines changed

3 files changed

+62
-20
lines changed

.github/workflows/full-test.yml renamed to .github/workflows/integration-test-cluster-neo4j-4.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@ name: Full Test
33
on:
44
push:
55
branches: [ '**' ]
6+
pull_request:
7+
branches: ['**']
68

79
jobs:
810
tests:
911
runs-on: ubuntu-latest
10-
name: "Running full tests"
1112
env:
12-
CONNECTIONS: ${{ secrets.CONNECTIONS }}
13+
CONNECTIONS: neo4j://neo4j:testtest@core1
14+
name: "Running Integration tests for PHP ${{ matrix.php-version }} on a Neo4j ${{ matrix.neo4j-version }} cluster"
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-version: ["8.0", "8.2"]
19+
neo4j-version: ["4.4"]
1320

1421
steps:
1522
- uses: actions/checkout@v2
@@ -31,21 +38,6 @@ jobs:
3138
bootstrap: vendor/autoload.php
3239

3340
services:
34-
neo4j:
35-
image: neo4j:4.4
36-
options: >-
37-
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
38-
--health-start-period "60s"
39-
--health-interval "30s"
40-
--health-timeout "15s"
41-
--health-retries "5"
42-
ports:
43-
- 7687:7687
44-
- 7474:7474
45-
env:
46-
NEO4J_AUTH: neo4j/test
47-
NEO4JLABS_PLUGINS: '["apoc"]'
48-
4941
core1:
5042
image: neo4j:4.4-enterprise
5143
options: >-

.github/workflows/full-test-neo4j-5.yml renamed to .github/workflows/integration-test-cluster-neo4j-5.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
tests:
1111
runs-on: ubuntu-latest
1212
env:
13-
CONNECTIONS: bolt://neo4j:testtest@localhost,http://neo4j:testtest@localhost,neo4j://neo4j:testtest@localhost
14-
name: "Running Integration tests for PHP 8.0 on Neo4j ${{ matrix.neo4j-version }} with simple config"
13+
CONNECTIONS: neo4j://neo4j:testtest@server1
14+
name: "Running Integration tests for PHP ${{ matrix.php-version }} on a Neo4j ${{ matrix.neo4j-version }} cluster"
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
php-version: ["8.0", "8.1", "8.2"]
18+
php-version: ["8.0", "8.2"]
1919
neo4j-version: ["5.0", "5.6"]
2020

2121
services:
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Integration Tests
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: ['**']
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
env:
13+
CONNECTIONS: neo4j://neo4j:testtest@neo4j,bolt://neo4j:testtest@neo4j,http://neo4j:testtest@neo4j
14+
name: "Running Integration tests for PHP ${{ matrix.php-version }} on a Neo4j ${{ matrix.neo4j-version }} single instance"
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
php-version: ["8.0", "8.2"]
19+
neo4j-version: ["4.4", "5.0", "5.6"]
20+
21+
services:
22+
neo4j:
23+
image: neo4j:${{ matrix.neo4j-version }}
24+
env:
25+
NEO4J_AUTH: neo4j/testtest
26+
NEO4JLABS_PLUGINS: '["apoc"]'
27+
ports:
28+
- 7687:7687
29+
- 7474:7474
30+
options: >-
31+
--health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1"
32+
--health-start-period "60s"
33+
--health-interval "30s"
34+
--health-timeout "15s"
35+
--health-retries "5"
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Cache Composer dependencies
40+
uses: actions/cache@v2
41+
with:
42+
path: /tmp/composer-cache
43+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
44+
- uses: php-actions/composer@v6
45+
with:
46+
progress: yes
47+
php_version: ${{ matrix.php-version }}
48+
version: 2
49+
- name: Run unit tests
50+
run: vendor/bin/phpunit --testsuite Integration

0 commit comments

Comments
 (0)