Skip to content

Merge pull request #12 from UKEIAM/deploybeforepaper #22

Merge pull request #12 from UKEIAM/deploybeforepaper

Merge pull request #12 from UKEIAM/deploybeforepaper #22

Workflow file for this run

---
name: Unittests
on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
workflow_dispatch:
jobs:
builds:
runs-on: ubuntu-latest
strategy:
matrix:
python-version : ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Trigger unit tests
run: pytest test --run_neo4j_tests=True --neo4j_host=localhost --neo4j_port=7687 --neo4j_user=neo4j --neo4j_pwd=mycoolpwd --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
services:
neo4j:
image: neo4j:enterprise
env:
NEO4J_dbms_security_procedures_unrestricted: apoc.*
NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes"
NEO4J_AUTH: "neo4j/mycoolpwd"
NEO4J_dbms_connector_bolt_advertised__address: localhost:7687
NEO4J_PLUGINS: '["apoc"]'
options: >-
--health-cmd "cypher-shell -u neo4j -p mycoolpwd 'match (n) return count(n)'"
--health-timeout 10s
--health-retries 20
--health-interval 10s
--health-start-period 30s
ports:
- 7687:7687