Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit d7b5a1f

Browse files
Merge pull request #16 from BlueBrain/update-tox
Update ci, add python3.12, codecov@v4
2 parents 021c77e + 5764295 commit d7b5a1f

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

.github/workflows/run-tox.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.8', '3.9', '3.10', '3.11']
14+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1515
steps:
1616
- uses: actions/checkout@v3
1717
- name: Set up Python ${{ matrix.python-version }}
@@ -26,10 +26,10 @@ jobs:
2626
run: |
2727
tox
2828
- name: Upload to codecov
29-
if: ${{matrix.python-version == '3.10'}}
30-
uses: codecov/codecov-action@v1
29+
uses: codecov/codecov-action@v4
3130
with:
3231
fail_ci_if_error: false
3332
files: ./coverage.xml
3433
flags: pytest
35-
name: "vascpy-py310"
34+
name: "vascpy-py${{ matrix.python-version }}"
35+
token: ${{ secrets.CODECOV_TOKEN }}

tox.ini

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,28 @@
22
name = vascpy
33
testdeps =
44
pytest
5+
pytest-cov
56

67
[tox]
78
minversion = 3.1.0
89
envlist =
9-
py{38,39,310,311}
10-
py310-lint
11-
py310-coverage
10+
py{38,39,310,311,312}
11+
docs
12+
lint
13+
format
1214
ignore_basepython_conflict = true
1315

1416
[testenv]
1517
extras = all
1618
deps = {[base]testdeps}
17-
commands = py.test {posargs} tests
19+
commands = pytest \
20+
--cov={envsitepackagesdir}/{[base]name} \
21+
--cov-report term-missing \
22+
--cov-fail-under=100 \
23+
--cov-report=xml \
24+
--no-cov-on-fail \
25+
--cov-fail-under=95 \
26+
{posargs}
1827

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

27-
[testenv:py310-lint]
36+
[testenv:lint]
2837
deps =
2938
mypy
3039
isort
@@ -39,25 +48,13 @@ commands =
3948
pycodestyle {[base]name}
4049
pylint -j2 --ignored-modules=vtk {[base]name}
4150

42-
[testenv:py310-coverage]
43-
deps =
44-
{[base]testdeps}
45-
pytest-cov
46-
commands =
47-
pytest \
48-
--cov-report term-missing \
49-
--cov-report xml \
50-
--cov-report html \
51-
--cov={envsitepackagesdir}/{[base]name} \
52-
tests/
53-
54-
[testenv:py39-docs]
51+
[testenv:docs]
5552
changedir = doc
5653
extras = docs
5754
commands =
5855
make clean
5956
make html SPHINXOPTS=-W
60-
whitelist_externals =
57+
allowlist_externals =
6158
make
6259
rm
6360

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

7471
[gh-actions]
7572
python =
76-
3.7 : py37
77-
3.8 : py38
73+
3.8 : py38, lint
7874
3.9 : py39
7975
3.10: py310
80-
3.11: py311
76+
3.11: py311, docs
77+
3.12: py312

0 commit comments

Comments
 (0)