Skip to content

Commit d70d021

Browse files
committed
extracted matrix test from tests
1 parent f1b84a5 commit d70d021

File tree

3 files changed

+65
-16
lines changed

3 files changed

+65
-16
lines changed

.github/workflows/coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
--health-retries 5
3030
3131
core1:
32-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
32+
image: neo4j:4.3-enterprise
3333
ports:
3434
- 7686:7686
3535
- 5000
@@ -51,7 +51,7 @@ jobs:
5151
--health-timeout 10s
5252
--health-retries 5
5353
core2:
54-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
54+
image: neo4j:4.3-enterprise
5555
ports:
5656
- 7686
5757
- 5000
@@ -68,7 +68,7 @@ jobs:
6868
NEO4J_dbms_connectors_default__advertised__address: core2
6969

7070
core3:
71-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
71+
image: neo4j:4.3-enterprise
7272
ports:
7373
- 7686
7474
- 5000
@@ -90,7 +90,7 @@ jobs:
9090
--health-retries 5
9191
9292
readreplica1:
93-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
93+
image: neo4j:4.3-enterprise
9494
ports:
9595
- 7686
9696
- 5000

.github/workflows/matrix-test.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Unit and 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+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php-version: ['7.4', '8.0', '8.1']
16+
neo4j-version: ["3.5", "4.0", "4.1", "4.2", "4.3"]
17+
name: "Running test for PHP ${{ matrix.php-version }} on Neo4j ${{ matrix.neo4j-version }} with simple config"
18+
container:
19+
image: php:${{ matrix.php-version }}-cli
20+
env:
21+
NEO4J_CONNECTIONS: bolt://neo4j:test@neo4j,http://neo4j:test@neo4j
22+
23+
services:
24+
neo4j:
25+
image: neo4j:${{ matrix.neo4j-version }}
26+
ports:
27+
- 7474:7474
28+
- 7687:7687
29+
env:
30+
NEO4J_AUTH: neo4j/test
31+
options: >-
32+
--health-cmd "wget http://localhost:7474 || exit 1"
33+
--health-interval 30s
34+
--health-timeout 10s
35+
--health-retries 5
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Setup PHP
40+
run: |
41+
apt-get update && apt-get install -y \
42+
libzip-dev \
43+
unzip \
44+
&& docker-php-ext-install -j$(nproc) bcmath \
45+
- name: Install Composer
46+
run: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
47+
- name: Install dependencies
48+
run: /usr/local/bin/composer install
49+
- name: Run Unit tests
50+
run: vendor/bin/phpunit tests/Unit
51+
- name: Run Integration tests
52+
run: vendor/bin/phpunit tests/Integration

.github/workflows/tests.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,15 @@ on:
99
jobs:
1010
tests:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
php-version: ['7.4', '8.0', '8.1']
16-
neo4j-version: ["3.5", "4.0", "4.1", "4.2", "4.3"]
17-
name: "Running Tests for PHP ${{ matrix.php-version }} on Neo4j ${{ matrix.neo4j-version }}"
12+
name: "Running Tests for PHP 7.4 on Neo4j with complex config"
1813
container:
19-
image: php:${{ matrix.php-version }}-cli
14+
image: php:7.4-cli
15+
env:
16+
NEO4J_CONNECTIONS: ${{ secrets.NEO4J_CONNECTIONS }}
2017

2118
services:
2219
neo4j:
23-
image: neo4j:${{ matrix.neo4j-version }}
20+
image: neo4j:4.3
2421
ports:
2522
- 7474:7474
2623
- 7687:7687
@@ -33,7 +30,7 @@ jobs:
3330
--health-retries 5
3431
3532
core1:
36-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
33+
image: neo4j:4.3-enterprise
3734
ports:
3835
- 7686:7686
3936
- 5000
@@ -56,7 +53,7 @@ jobs:
5653
--health-retries 5
5754
5855
core2:
59-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
56+
image: neo4j:4.3-enterprise
6057
ports:
6158
- 7686
6259
- 5000
@@ -78,7 +75,7 @@ jobs:
7875
--health-retries 5
7976
8077
core3:
81-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
78+
image: neo4j:4.3-enterprise
8279
ports:
8380
- 7686
8481
- 5000
@@ -100,7 +97,7 @@ jobs:
10097
--health-retries 5
10198
10299
readreplica1:
103-
image: neo4j:${{ matrix.neo4j-version }}-enterprise
100+
image: neo4j:4.3-enterprise
104101
ports:
105102
- 7686
106103
- 5000

0 commit comments

Comments
 (0)