Skip to content

Commit

Permalink
ci: Introduce separate github workflow to test multiple versions of n…
Browse files Browse the repository at this point in the history
…eo4j
  • Loading branch information
prosto committed Feb 29, 2024
1 parent 288a3b2 commit e8d2e63
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: test

on:
workflow_dispatch:
inputs:
PYTHON_VERSION:
description: "List of python versions"
required: true
default: '["3.8.x", "3.9.x", "3.10.x"]'
OS_NAME:
description: "List of OS for test execution"
required: true
default: '["ubuntu-20.04"]'
NEO4J_VERSION:
description: "List of Neo4j docker images"
required: true
default: '["neo4j:5.13.0", "neo4j:5.14.0", "neo4j:5.15.0", "neo4j:5.16.0", "neo4j:5.17.0"]'

concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true

jobs:
test:
strategy:
matrix:
python-version: ${{ fromJSON(github.event.inputs.PYTHON_VERSION) }}
os: ${{ fromJSON(github.event.inputs.OS_NAME) }}
neo4j-version: ${{ fromJSON(github.event.inputs.NEO4J_VERSION) }}

runs-on: ${{ matrix.os }}

name: Python ${{ matrix.python-version }} test on Neo4j:${{ matrix.python-version }} OS:${{ matrix.os }}

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch

- name: Run tests
env:
NEO4J_VERSION: ${{ matrix.neo4j-version }}
run: |
hatch run test
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ test-cov = "coverage run -m pytest {args:tests}"
cov-report = ["- coverage combine", "coverage html"]
cov = ["test-cov", "cov-report"]

[tool.hatch.envs.default.env-vars]
NEO4J_VERSION = "neo4j:5.13.0"

[tool.hatch.envs.dev]
features = ["all"]
description = """
Expand Down

0 comments on commit e8d2e63

Please sign in to comment.