Skip to content

Commit 2a7c6b3

Browse files
committed
initial setup teskit ci
1 parent 545fdcf commit 2a7c6b3

File tree

1 file changed

+40
-24
lines changed

1 file changed

+40
-24
lines changed

.github/workflows/testkit.yml

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ on:
99
jobs:
1010
tests:
1111
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"
12+
name: "Running Testkit tests for PHP ${{matrix.php-version}} on Neo4j and testkit ${{ matrix.neo4j-version }} with simple config"
1513
strategy:
1614
fail-fast: false
1715
matrix:
@@ -29,28 +27,46 @@ jobs:
2927
- 7474:7474
3028
options: >-
3129
--health-cmd "wget http://localhost:7474 || exit 1"
32-
testkit-backend:
33-
image: php:${{ matrix.neo4j-version }}
34-
env:
35-
NEO4J_AUTH: neo4j/test
36-
NEO4JLABS_PLUGINS: '["apoc"]'
37-
ports:
38-
- 7687:7687
39-
- 7474:7474
40-
options: >-
41-
--health-cmd "wget http://localhost:7474 || exit 1"
4230
4331
steps:
44-
- uses: actions/checkout@v2
45-
- uses: php-actions/composer@v6
32+
- name: Checkout driver
33+
uses: actions/checkout@v2
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
4637
with:
47-
progress: yes
48-
php_version: 7.4
49-
version: 2
50-
- uses: php-actions/phpunit@v3
38+
php-version: ${{ matrix.php-version }}
39+
40+
- name: Checkout TestKit (testing tool)
41+
uses: actions/checkout@v2
5142
with:
52-
configuration: phpunit.xml.dist
53-
php_version: 7.4
54-
php_extensions: bcmath
55-
bootstrap: vendor/autoload.php
56-
args: --testsuite "Integration"
43+
repository: neo4j-drivers/testkit
44+
path: testkit
45+
46+
- name: Install dependencies
47+
run: |
48+
sudo apt-get update
49+
# install docker
50+
sudo apt-get install \
51+
apt-transport-https \
52+
ca-certificates \
53+
curl \
54+
gnupg \
55+
lsb-release
56+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
57+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
58+
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
59+
sudo apt-get update
60+
sudo apt-get install docker-ce docker-ce-cli containerd.io
61+
# Python (needed for dummy driver and TestKit)
62+
sudo apt-get install python3 python3-pip
63+
64+
- name: Run TestKit
65+
env:
66+
TEST_NEO4J_HOST: localhost
67+
TEST_NEO4J_USER: neo4j
68+
TEST_NEO4J_PASS: test
69+
TEST_DRIVER_NAME: php
70+
run: |
71+
cd testkit
72+
python3 -m unittest -v "tests.neo4j.test_authentication.TestAuthenticationBasic"

0 commit comments

Comments
 (0)