Skip to content

Commit 5240b15

Browse files
committed
extracted neo4j 3.5 tests without healthchecks
1 parent 5ae6caf commit 5240b15

File tree

5 files changed

+141
-7
lines changed

5 files changed

+141
-7
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
NEO4J_CONNECTIONS: bolt://neo4j:test@localhost,http://neo4j:test@localhost
14+
name: "Running Integration tests for PHP 7.4 on Neo4j ${{ matrix.neo4j-version }} with simple config"
15+
services:
16+
neo4j:
17+
image: neo4j:3.5
18+
env:
19+
NEO4J_AUTH: neo4j/test
20+
NEO4JLABS_PLUGINS: '["apoc"]'
21+
ports:
22+
- 7687:7687
23+
- 7474:7474
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Cache Composer dependencies
28+
uses: actions/cache@v2
29+
with:
30+
path: /tmp/composer-cache
31+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
32+
- uses: php-actions/composer@v6
33+
with:
34+
progress: yes
35+
php_version: 7.4
36+
version: 2
37+
- name: Sleep for 60s
38+
uses: juliangruber/sleep-action@v1
39+
with:
40+
time: 60s
41+
- uses: php-actions/phpunit@v3
42+
with:
43+
configuration: phpunit.xml.dist
44+
php_version: 7.4
45+
bootstrap: vendor/autoload.php
46+
args: --testsuite "Integration"

.github/workflows/integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
neo4j-version: ["3.5", "4.2", "4.3", "4.4"]
18+
neo4j-version: ["4.2", "4.3", "4.4"]
1919

2020
services:
2121
neo4j:
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Testkit Tests
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: ['**']
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
name: "Running Testkit tests for PHP ${{matrix.php-version}} on Neo4j and testkit ${{ matrix.neo4j-version }} with simple config"
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-version: ["7.4", "8.1"]
17+
18+
services:
19+
neo4j:
20+
image: neo4j:3.5
21+
env:
22+
NEO4J_AUTH: neo4j/test
23+
NEO4JLABS_PLUGINS: '["apoc"]'
24+
ports:
25+
- 7687:7687
26+
- 7474:7474
27+
28+
steps:
29+
- name: Checkout driver
30+
uses: actions/checkout@v2
31+
32+
- name: Cache Composer dependencies
33+
uses: actions/cache@v2
34+
with:
35+
path: /tmp/composer-cache
36+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
37+
38+
- uses: php-actions/composer@v6
39+
with:
40+
progress: yes
41+
php_version: ${{ matrix.php-version }}
42+
version: 2
43+
44+
- name: Setup PHP
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: ${{ matrix.php-version }}
48+
49+
- name: Checkout TestKit (testing tool)
50+
uses: actions/checkout@v2
51+
with:
52+
repository: neo4j-drivers/testkit
53+
path: testkit
54+
ref: '4.3'
55+
56+
- name: Install dependencies
57+
run: |
58+
sudo apt-get update
59+
# install docker
60+
sudo apt-get install \
61+
apt-transport-https \
62+
ca-certificates \
63+
curl \
64+
gnupg \
65+
lsb-release
66+
# Python (needed for dummy driver and TestKit)
67+
sudo apt-get install python3 python3-pip
68+
git clone https://github.com/pyenv/pyenv.git .pyenv
69+
python -m pip install --upgrade pip
70+
cd testkit
71+
python -m pip install -r requirements.txt
72+
73+
- name: Sleep for 60s
74+
uses: juliangruber/sleep-action@v1
75+
with:
76+
time: 60s
77+
78+
- name: Run TestKit
79+
env:
80+
TEST_NEO4J_HOST: localhost
81+
TEST_NEO4J_USER: neo4j
82+
TEST_NEO4J_PASS: test
83+
TEST_DRIVER_NAME: php
84+
run: |
85+
php testkit-backend/index.php &
86+
cd testkit
87+
sleep 2
88+
python3 -m unittest -v "tests.neo4j.test_authentication.TestAuthenticationBasic"

.github/workflows/testkit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
neo4j-version: ["3.5", "4.2", "4.3", "4.4"]
16+
neo4j-version: ["4.2", "4.3", "4.4"]
1717
php-version: ["7.4", "8.1"]
1818

1919
services:

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ services:
6262
- neo4j
6363
image: neo4j:4.4-enterprise
6464
healthcheck:
65-
test: "wget http://localhost:7474 || exit 1"
65+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
6666
interval: 30s
6767
timeout: 10s
6868
retries: 5
@@ -78,7 +78,7 @@ services:
7878
core1:
7979
image: neo4j:4.4-enterprise
8080
healthcheck:
81-
test: "wget http://localhost:7474 || exit 1"
81+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
8282
interval: 30s
8383
timeout: 10s
8484
retries: 5
@@ -99,7 +99,7 @@ services:
9999
core2:
100100
image: neo4j:4.4-enterprise
101101
healthcheck:
102-
test: "wget http://localhost:7474 || exit 1"
102+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
103103
interval: 30s
104104
timeout: 10s
105105
retries: 5
@@ -120,7 +120,7 @@ services:
120120
core3:
121121
image: neo4j:4.4-enterprise
122122
healthcheck:
123-
test: "wget http://localhost:7474 || exit 1"
123+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
124124
interval: 30s
125125
timeout: 10s
126126
retries: 5
@@ -141,7 +141,7 @@ services:
141141
readreplica1:
142142
image: neo4j:4.4-enterprise
143143
healthcheck:
144-
test: "wget http://localhost:7474 || exit 1"
144+
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
145145
interval: 30s
146146
timeout: 10s
147147
retries: 5

0 commit comments

Comments
 (0)