Skip to content

Commit

Permalink
Merge pull request #334 from incf-nidash/test-tox
Browse files Browse the repository at this point in the history
Add testing via tox
  • Loading branch information
yarikoptic authored May 2, 2023
2 parents afa8f74 + c1e965c commit 3086a24
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ jobs:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install .
- name: Test with pytest
run: |
pytest
python -m pip install --upgrade tox
- name: Test
run: tox -e py3
- name: Upload pytest test results
uses: actions/upload-artifact@v2
with:
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ install_requires =
duecredit
etelemetry
graphviz
importlib-resources; python_version < '3.9'
joblib
numpy >= 1.16.5
ontquery ~= 0.2.3
Expand All @@ -49,7 +48,6 @@ install_requires =
pydotplus
pygithub
pyld >= 1.0.5, <2.0
pytest
rapidfuzz
rdflib
rdflib-jsonld
Expand Down
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
[tox]
envlist = lint
envlist = lint,py3

[testenv]
deps =
importlib-resources; python_version < '3.9'
pytest
commands =
pytest {posargs} tests

[testenv:lint]
skip_install = True
Expand Down

0 comments on commit 3086a24

Please sign in to comment.