[tox] envlist = cov_clean, py27, py34, cov_report, py3kwarn, pep8 [testenv] deps = coverage mock commands = coverage run -a setup.py test # -------------------------------------------------------------------- # Coverage # -------------------------------------------------------------------- [testenv:cov_clean] whitelist_externals = rm commands = coverage erase rm -rf htmlcov [testenv:py27] whitelist_externals = bash mv commands = bash -c "if [ ! -d .coverage.data ]; then mkdir .coverage.data; fi" coverage run -a setup.py test mv {toxinidir}/.coverage {toxinidir}/.coverage.data/.coverage.{envname} [testenv:py34] whitelist_externals = bash mv commands = bash -c "if [ ! -d .coverage.data ]; then mkdir .coverage.data; fi" coverage run -a setup.py test mv {toxinidir}/.coverage {toxinidir}/.coverage.data/.coverage.{envname} [testenv:cov_report] whitelist_externals = cp sudo commands = coverage combine .coverage.data coverage html -d {toxinidir}/htmlcov sudo cp -a {toxinidir}/htmlcov /var/www/PyOTRS/ # -------------------------------------------------------------------- # Lint # -------------------------------------------------------------------- [testenv:py3kwarn] deps = py3kwarn commands = py3kwarn pyotrs [testenv:pep8] deps = flake8 flake8-quotes # NOTE(kgriffs): Run with py27 since some code branches assume the # unicode type is defined, and pep8 complains in those cases when # running under py3. basepython = python2.7 commands = flake8 \ --max-complexity=15 \ --exclude=./build,.venv,.tox,dist,docs,test_pyotrs.py \ --ignore=Q000 \ --max-line-length=99 \ [] # -------------------------------------------------------------------- # Documentation # -------------------------------------------------------------------- [testenv:docs] deps = jinja2 pygments docutils markupsafe sphinx sphinxcontrib-napoleon sphinx_rtd_theme whitelist_externals = rm pandoc cp sudo basepython = python2.7 commands = rm -rf {toxinidir}/docs/build pandoc -f markdown -t rst -o {toxinidir}/docs/source/changelog_pandoc.txt CHANGELOG.md pandoc -f markdown -t rst -o {toxinidir}/docs/source/contributing_pandoc.txt CONTRIBUTING.md sphinx-build -b html {toxinidir}/docs/source {toxinidir}/docs/build sudo rm -rf /var/www/PyOTRS/docs sudo cp -a {toxinidir}/docs/build /var/www/PyOTRS/docs