Skip to content

Commit

Permalink
Merge pull request #253 from RDFLib/ci_matrix_testing
Browse files Browse the repository at this point in the history
Add Tox tests to Github Actions suite
  • Loading branch information
ashleysommer authored Oct 1, 2024
2 parents ab4bf12 + 201f496 commit b30e0ff
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 247 deletions.
215 changes: 0 additions & 215 deletions .drone.yml

This file was deleted.

30 changes: 28 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'

steps:
Expand All @@ -40,10 +43,33 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Run tests
- name: Install venv for test suite with Python version ${{ matrix.python-version }}
run: |
python3 -m venv venv
source venv/bin/activate
pip install poetry
python -m pip install poetry
make dev
- name: Run linting checks
run: |
source venv/bin/activate
make lint
- name: Run type checking
run: |
source venv/bin/activate
make type-check
- name: Install tox
run: |
source venv/bin/activate
poetry run python -m pip install "tox>=4.20.0" "tox-gh>=1.4.1"
- name: Setup test suite
run: |
source venv/bin/activate
tox -vv --notest
- name: Run test suite
run: |
source venv/bin/activate
tox --skip-pkg-install
39 changes: 9 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -212,55 +212,25 @@ toxworkdir={env:TOX_WORK_DIR:.tox}
deps =
poetry>=1.8.2
passenv =
TRAVIS
TRAVIS_JOB_ID
TRAVIS_BRANCH
TRAVIS_BUILD_DIR
DRONE_BUILD_NUMBER
DRONE_STAGE_NAME
DRONE_STAGE_KIND
DRONE_REPO_NAME
DRONE_SOURCE_BRANCH
COVERALLS_SERVICE_NAME
COVERALLS_REPO_TOKEN
DRONE_COMMIT_AUTHOR_NAME
DRONE_COMMIT_AUTHOR_EMAIL
DRONE_COMMIT
HAS_COVERALLS
DBUS_SESSION_BUS_ADDRESS
PIP_KEYRING_PROVIDER
PIP_FORCE_KEYRING
PYTHON_KEYRING_BACKEND
skip_install = true
allowlist_externals = python3, ls, pwd, env, poetry
setenv =
COVERALLS_SERVICE_NUMBER ={env:DRONE_BUILD_NUMBER:0}
COVERALLS_SERVICE_JOB_ID = {env:DRONE_STAGE_NAME:stage}
COVERALLS_SERVICE_JOB_NUMBER = {env:DRONE_BUILD_NUMBER:0}
COVERALLS_FLAG_NAME = {env:DRONE_STAGE_KIND:build}
COVERALLS_GIT_REPO = {env:DRONE_REPO_NAME:RDFLib/pySHACL}
COVERALLS_GIT_BRANCH = {env:DRONE_SOURCE_BRANCH:master}
CI_BRANCH = {env:DRONE_SOURCE_BRANCH:master}
GIT_BRANCH = {env:DRONE_SOURCE_BRANCH:master}
GIT_AUTHOR_NAME = {env:DRONE_COMMIT_AUTHOR_NAME:nobody}
GIT_AUTHOR_EMAIL = {env:DRONE_COMMIT_AUTHOR_EMAIL:[email protected]}
GIT_ID = {env:DRONE_COMMIT:0}
commands_pre =
py39: poetry run pip3 install -U "pip>=21.0"
py310: poetry run pip3 install -U "pip>=21.3"
py311: poetry run pip3 install -U "pip>=22.1"
poetry install -vv -n --no-root --extras "js dev-coverage"
# Coveralls required to send coverage report to coveralls.io
py38: poetry run pip3 install "coveralls>=3.3.1"
commands =
- poetry show
poetry run pytest --cov=pyshacl test/
- poetry run coverage combine --append
poetry run coverage report -m
poetry run coverage html -i
py38: - coveralls
[testenv:lint]
commands_pre =
Expand All @@ -281,4 +251,13 @@ commands =
- poetry show
poetry run python3 -m mypy --ignore-missing-imports pyshacl
[gh]
# Don't include lint or type-checking in gh-actions matrix
python =
3.12 = py312
3.11 = py311
3.10 = py310
3.9 = py39
3.8 = py38
"""

0 comments on commit b30e0ff

Please sign in to comment.