Skip to content

Commit

Permalink
Merge pull request #16 from BlueBrain/update-tox
Browse files Browse the repository at this point in the history
Update ci, add python3.12, codecov@v4
  • Loading branch information
eleftherioszisis authored Feb 19, 2024
2 parents 021c77e + 5764295 commit d7b5a1f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/run-tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -26,10 +26,10 @@ jobs:
run: |
tox
- name: Upload to codecov
if: ${{matrix.python-version == '3.10'}}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
files: ./coverage.xml
flags: pytest
name: "vascpy-py310"
name: "vascpy-py${{ matrix.python-version }}"
token: ${{ secrets.CODECOV_TOKEN }}
41 changes: 19 additions & 22 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@
name = vascpy
testdeps =
pytest
pytest-cov

[tox]
minversion = 3.1.0
envlist =
py{38,39,310,311}
py310-lint
py310-coverage
py{38,39,310,311,312}
docs
lint
format
ignore_basepython_conflict = true

[testenv]
extras = all
deps = {[base]testdeps}
commands = py.test {posargs} tests
commands = pytest \
--cov={envsitepackagesdir}/{[base]name} \
--cov-report term-missing \
--cov-fail-under=100 \
--cov-report=xml \
--no-cov-on-fail \
--cov-fail-under=95 \
{posargs}

[testenv:format]
deps =
Expand All @@ -24,7 +33,7 @@ commands =
isort -l 100 --profile black {[base]name} tests setup.py
black -l 100 {[base]name} tests setup.py

[testenv:py310-lint]
[testenv:lint]
deps =
mypy
isort
Expand All @@ -39,25 +48,13 @@ commands =
pycodestyle {[base]name}
pylint -j2 --ignored-modules=vtk {[base]name}

[testenv:py310-coverage]
deps =
{[base]testdeps}
pytest-cov
commands =
pytest \
--cov-report term-missing \
--cov-report xml \
--cov-report html \
--cov={envsitepackagesdir}/{[base]name} \
tests/

[testenv:py39-docs]
[testenv:docs]
changedir = doc
extras = docs
commands =
make clean
make html SPHINXOPTS=-W
whitelist_externals =
allowlist_externals =
make
rm

Expand All @@ -73,8 +70,8 @@ max-line-length = 100

[gh-actions]
python =
3.7 : py37
3.8 : py38
3.8 : py38, lint
3.9 : py39
3.10: py310
3.11: py311
3.11: py311, docs
3.12: py312

0 comments on commit d7b5a1f

Please sign in to comment.