Skip to content

Commit

Permalink
Merge pull request #24 from hickeyma/fix-tox-py-ver
Browse files Browse the repository at this point in the history
tox: Add base Python version to tox environment
  • Loading branch information
chichun-charlie-liu authored Dec 9, 2024
2 parents 404d479 + fd9ed0d commit 6b702d1
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py, lint, fmt
envlist = fmt, lint, unit
minversion = 4.4

[testenv]
Expand All @@ -11,18 +11,26 @@ wheel_build_env = pkg
deps =
pytest
commands =
pytest {posargs:tests}
unit: {basepython} -m pytest {posargs:tests}

[testenv:py3]
basepython = python3.11

[testenv:unit]
basepython = {[testenv:py3]basepython}

[testenv:lint]
basepython = {[testenv:py3]basepython}
description = lint with pylint
deps =
pytest
pylint>=2.16.2,<4.0
pylint-pydantic
commands =
{envpython} -m pylint --load-plugins pylint_pydantic fms_mo/ tests/
{basepython} -m pylint --load-plugins pylint_pydantic fms_mo/ tests/

[testenv:fmt]
basepython = {[testenv:py3]basepython}
description = format with pre-commit
deps =
pre-commit
Expand All @@ -43,3 +51,9 @@ commands =
coverage report -m
coverage xml
genbadge coverage -s -i coverage.xml

[gh]
python =
3.11 = 3.11
3.10 = 3.10
3.9 = 3.9

0 comments on commit 6b702d1

Please sign in to comment.