tox.ini 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. [tox]
  2. envlist =
  3. docs, packaging, lint-py2, lint-py3, mypy,
  4. py27, py34, py35, py36, py37, py38, pypy, pypy3
  5. [testenv]
  6. passenv = CI GIT_SSL_CAINFO
  7. setenv =
  8. # This is required in order to get UTF-8 output inside of the subprocesses
  9. # that our tests use.
  10. LC_CTYPE = en_US.UTF-8
  11. deps = -r{toxinidir}/tools/tests-requirements.txt
  12. commands = pytest --timeout 300 []
  13. install_command = python -m pip install {opts} {packages}
  14. usedevelop = True
  15. [testenv:coverage-py3]
  16. basepython = python3
  17. commands = pytest --timeout 300 --cov=pip --cov-report=term-missing --cov-report=xml --cov-report=html tests/unit {posargs}
  18. [testenv:docs]
  19. # Don't skip install here since pip_sphinxext uses pip's internals.
  20. deps = -r{toxinidir}/tools/docs-requirements.txt
  21. basepython = python2.7
  22. commands =
  23. sphinx-build -W -d {envtmpdir}/doctrees/html -b html docs/html docs/build/html
  24. # Having the conf.py in the docs/html is weird but needed because we
  25. # can not use a different configuration directory vs source directory on RTD
  26. # currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
  27. # That is why we have a "-c docs/html" in the next line.
  28. sphinx-build -W -d {envtmpdir}/doctrees/man -b man docs/man docs/build/man -c docs/html
  29. [testenv:packaging]
  30. skip_install = True
  31. deps =
  32. check-manifest
  33. readme_renderer
  34. commands =
  35. check-manifest
  36. python setup.py check -m -r -s
  37. [lint]
  38. deps = -r{toxinidir}/tools/lint-requirements.txt
  39. commands =
  40. flake8
  41. isort --check-only --diff
  42. [testenv:lint-py2]
  43. skip_install = True
  44. basepython = python2
  45. deps = {[lint]deps}
  46. commands = {[lint]commands}
  47. [testenv:lint-py3]
  48. skip_install = True
  49. basepython = python3
  50. deps = {[lint]deps}
  51. commands = {[lint]commands}
  52. [testenv:mypy]
  53. skip_install = True
  54. basepython = python3
  55. deps = mypy
  56. commands =
  57. mypy src
  58. mypy src -2