Skip to content

Commit

Permalink
Add tox config
Browse files Browse the repository at this point in the history
  • Loading branch information
noc0lour committed May 11, 2023
1 parent 66f4a86 commit cd790b4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,57 @@ autodoc_exclude_members = [
"__abstractmethods__",
"__hash__",
]
[tool.tox]
[tox]
description = list of environments against which tox runs the tests
envlist =
reformat
check
py3-fast
# See https://tox.readthedocs.io/en/latest/example/package.html#flit
isolated_build = True
isolated_build_env = build
skip_missing_interpreters = False

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310, mypy

[testenv]
# install pytest in the virtualenv where commands will be executed
setenv =
PYTHONUNBUFFERED = yes
PIP_PREFER_BINARY = 1
passenv = *
extras =
dev
# This is already the default, but we include it here
# to remind ourselves that usedevelop is incompatible with flit,
# see https://tox.readthedocs.io/en/latest/config.html#conf-usedevelop
usedevelop = False
commands =
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv}

[testenv:check]
description = this environments checks for flake8 and black
deps =
black==21.6b0
pyproject-flake8
flake8
build
skip_install = true
commands =
pflake8 src tests apps
black --check --diff src tests apps
python -m build

[testenv:reformat]
description = reformats the code using black
deps =
black==21.6b0
skip_install = true
commands =
black src tests apps

0 comments on commit cd790b4

Please sign in to comment.