Skip to content

Merge branch 'main' into testkit #349

Merge branch 'main' into testkit

Merge branch 'main' into testkit #349

Workflow file for this run

name: Testkit Tests
on:
push:
branches: [ '**' ]
pull_request:
branches: ['**']
jobs:
tests:
runs-on: ubuntu-latest
name: "Running Testkit tests for PHP ${{matrix.php-version}} on Neo4j and testkit ${{ matrix.neo4j-version }} with simple config"
strategy:
fail-fast: false
matrix:
neo4j-version: ["3.5", "4.0", "4.1", "4.2", "4.3"]
php-version: ["7.4", "8.0", "8.1"]
services:
neo4j:
image: neo4j:${{ matrix.neo4j-version }}
env:
NEO4J_AUTH: neo4j/test
NEO4JLABS_PLUGINS: '["apoc"]'
ports:
- 7687:7687
- 7474:7474
options: >-
--health-cmd "wget http://localhost:7474 || exit 1"
steps:
- name: Checkout driver
uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
progress: yes
php_version: ${{ matrix.php-version }}
version: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Checkout TestKit (testing tool)
uses: actions/checkout@v2
with:
repository: neo4j-drivers/testkit
path: testkit
ref: '4.3'
- name: Install dependencies
run: |
sudo apt-get update
# install docker
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
# Python (needed for dummy driver and TestKit)
sudo apt-get install python3 python3-pip
git clone https://github.com/pyenv/pyenv.git .pyenv
python -m pip install --upgrade pip
cd testkit
python -m pip install -r requirements.txt
- name: Run TestKit
env:
TEST_NEO4J_HOST: localhost
TEST_NEO4J_USER: neo4j
TEST_NEO4J_PASS: test
TEST_DRIVER_NAME: php
run: |
php testkit-backend/index.php &
cd testkit
sleep 2
python3 -m unittest -v "tests.neo4j.test_authentication.TestAuthenticationBasic"