- [tox]
- envlist = cov_init, py3, cov_report, docs, bandit, pylint
-
- [testenv]
- basepython =
- py3: {env:TOXPYTHON:python3}
- py37: {env:TOXPYTHON:python3.7}
- py38: {env:TOXPYTHON:python3.8}
- py39: {env:TOXPYTHON:python3.9}
- {bandit,cov_init,cov_report,docs,lint,pur,pylint}: {env:TOXPYTHON:python3}
- setenv =
- PYTHONPATH={toxinidir}:{toxinidir}/{{ cookiecutter.project_slug }}
- PYTHONUNBUFFERED=yes
- HOME={env:HOME:/tmp}
- passenv = COVERAGE_FILE PYTHONPATH PYTHONUNBUFFERED HOME
- skip_missing_interpreters = True
- alwayscopy = True
- deps =
- -r {toxinidir}/requirements/test.txt
- commands =
- pytest --durations 25 \
- --basetemp={envtmpdir} \
- --confcutdir=.. \
- --cov \
- --cov-append \
- -n 0 \
- {posargs}
-
- [testenv:cov_init]
- deps =
- coverage
- skip_install = True
- commands =
- coverage erase
-
- [testenv:cov_report]
- deps =
- coverage
- skip_install = True
- commands =
- coverage html
- {toxinidir}/docs/source/coverage/extract_source.py
-
- [testenv:lint]
- deps =
- pre-commit
- twine
- ignore_errors = True
- commands =
- twine check {distdir}/*
- pre-commit run --all-files
-
- [testenv:pur]
- deps =
- pur
- skip_install = True
- description =
- Update all versioned packages in requirements.txt files
- commands =
- pur -r requirements-all.txt
-
- [testenv:pylint]
- deps =
- pylint==1.9.4; python_version >= "2.7" and python_version < "3.0"
- pylint; python_version >= "3.4"
- skip_install = True
- commands =
- pylint --rcfile=.pylintrc --fail-under 9.5 {{ cookiecutter.project_slug }}
-
- [testenv:bandit]
- deps =
- bandit
- skip_install = True
- commands =
- bandit -r {{ cookiecutter.project_slug }}
-
- [testenv:docs]
- deps =
- -r {toxinidir}/requirements/dev.txt
- skip_install = True
- description =
- Invoke sphinx-build to build the HTML docs
- commands =
- python setup.py build_sphinx -q {posargs}
|