Skip to content

Commit 4d009dd

Browse files
additional changes from new version
1 parent d37cbe0 commit 4d009dd

File tree

9 files changed

+236
-193
lines changed

9 files changed

+236
-193
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests with a database PHP7
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ '**' ]
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-18.04
12+
name: "Running Integration tests for PHP ${{ matrix.php-version }} on Neo4j ${{ matrix.neo4j-version }}"
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
neo4j-version: ["4.3", "4.4"]
17+
php-version: ['7.1', '7.2', '7.3', '7.4']
18+
19+
services:
20+
neo4j:
21+
image: neo4j:${{ matrix.neo4j-version }}
22+
env:
23+
NEO4J_AUTH: neo4j/nothing
24+
NEO4JLABS_PLUGINS: '["apoc"]'
25+
ports:
26+
- 7687:7687
27+
- 7474:7474
28+
options: >-
29+
--health-cmd "wget http://localhost:7474 || exit 1"
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php-version }}
39+
extensions: mbstring, sockets
40+
coverage: xdebug
41+
ini-values: max_execution_time=0
42+
43+
- name: Install dependencies
44+
run: composer install --no-progress
45+
46+
- name: Test with phpunit
47+
run: vendor/bin/phpunit --configuration phpunit.xml --testsuite "Database"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests with a database PHP8
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ '**' ]
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-20.04
12+
name: "Running Integration tests for PHP ${{ matrix.php-version }} on Neo4j ${{ matrix.neo4j-version }}"
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
neo4j-version: ["4.3", "4.4"]
17+
php-version: ['8.0', '8.1']
18+
19+
services:
20+
neo4j:
21+
image: neo4j:${{ matrix.neo4j-version }}
22+
env:
23+
NEO4J_AUTH: neo4j/nothing
24+
NEO4JLABS_PLUGINS: '["apoc"]'
25+
ports:
26+
- 7687:7687
27+
- 7474:7474
28+
options: >-
29+
--health-cmd "wget http://localhost:7474 || exit 1"
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php-version }}
39+
extensions: mbstring, sockets
40+
coverage: xdebug
41+
ini-values: max_execution_time=0
42+
43+
- name: Install dependencies
44+
run: composer install --no-progress
45+
46+
- name: Test with phpunit
47+
run: vendor/bin/phpunit --configuration phpunit.xml --testsuite "Database"

.github/workflows/db-tests.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/no-db-test-php-7.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ '**' ]
66
pull_request:
7-
branches: ['**']
7+
branches: [ '**' ]
88

99
jobs:
1010
tests:

.github/workflows/no-db-test-php-8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ '**' ]
66
pull_request:
7-
branches: ['**']
7+
branches: [ '**' ]
88

99
jobs:
1010
tests:

phpunit.xml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
<phpunit bootstrap="src/autoload.php">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="src/autoload.php">
23
<testsuites>
3-
<testsuite name="Bolt">
4-
<directory>tests</directory>
4+
<testsuite name="Database">
5+
<directory>./tests/connection</directory>
6+
<file>./tests/BoltTest.php</file>
7+
<directory>./tests/error</directory>
8+
<directory>./tests/PackStream</directory>
9+
</testsuite>
10+
<testsuite name="NoDatabase">
11+
<directory>./tests/error</directory>
12+
<directory>./tests/PackStream</directory>
13+
<directory>./tests/protocol</directory>
514
</testsuite>
615
</testsuites>
716
<php>
817
<var name="NEO_USER" value="neo4j"/>
918
<var name="NEO_PASS" value="nothing"/>
1019
</php>
11-
<filter>
12-
<whitelist>
13-
<directory suffix=".php">src/connection</directory>
14-
<directory suffix=".php">src/PackStream</directory>
15-
<directory suffix=".php">src/protocol</directory>
16-
<directory suffix=".php">src/helpers</directory>
17-
<directory suffix=".php">src/structures</directory>
18-
<file>src/Bolt.php</file>
19-
</whitelist>
20-
</filter>
21-
</phpunit>
20+
</phpunit>

phpunit.xml.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<phpunit colors="true" verbose="true"
23
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
34
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
@@ -11,7 +12,8 @@
1112
<testsuite name="Database">
1213
<directory>./tests/connection</directory>
1314
<file>./tests/BoltTest.php</file>
14-
<file>./tests/StructuresTest.php</file>
15+
<directory>./tests/error</directory>
16+
<directory>./tests/PackStream</directory>
1517
</testsuite>
1618
<testsuite name="NoDatabase">
1719
<directory>./tests/error</directory>
@@ -24,5 +26,3 @@
2426
<var name="NEO_PASS" value="nothing"/>
2527
</php>
2628
</phpunit>
27-
28-

tests/connection/AConnectionTest.php

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)