1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
[tox]
envlist = format, py36, py37, py38, py39, py310, py311, lint
skip_missing_interpreters = True
[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/yalexs
allowlist_externals = /usr/bin/env
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
commands =
py.test --basetemp={envtmpdir} --cov --cov-report term-missing
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_tests.txt
[testenv:format]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/yalexs
allowlist_externals = /usr/bin/env
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
commands =
isort --check --diff yalexs tests
black --check --diff yalexs tests
deps =
-r{toxinidir}/requirements_tests.txt
[testenv:codecov]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/yalexs
allowlist_externals = /usr/bin/env
install_command = /usr/bin/env LANG=C.UTF-8 pip install {opts} {packages}
commands =
py.test --basetemp={envtmpdir} --cov --cov-report=xml {posargs}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_tests.txt
[testenv:lint]
ignore_errors = True
commands =
flake8
pylint yalexs
[testenv:bandit]
commands =
bandit -r yalexs
deps =
-r{toxinidir}/requirements_tests.txt
[flake8]
max-line-length = 120
|