summaryrefslogtreecommitdiff
path: root/tox.ini
blob: e5cd70a57fc4c22d2a6bd042632542f47cf1e835 (plain)
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
54
55
56
57
58
59
[tox]
envlist =
    docs, packaging, lint-py2, lint-py3, mypy,
    py27, py33, py34, py35, py36, py37, pypy

[testenv]
passenv = CI GIT_SSL_CAINFO
setenv =
    # This is required in order to get UTF-8 output inside of the subprocesses
    # that our tests use.
    LC_CTYPE = en_US.UTF-8
deps = -r{toxinidir}/dev-requirements.txt
commands = py.test --timeout 300 []
install_command = python -m pip install {opts} {packages}
usedevelop = True

[testenv:coverage-py3]
basepython = python3
commands = py.test --timeout 300 --cov=pip --cov-report=term-missing --cov-report=xml --cov-report=html tests/unit {posargs}

[testenv:docs]
deps = -r{toxinidir}/docs-requirements.txt
basepython = python2.7
commands =
    sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/build/html
    sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/build/man

[testenv:packaging]
deps =
    check-manifest
    readme_renderer
commands =
    check-manifest
    python setup.py check -m -r -s

[lint]
deps =
    flake8==3.3.0
    isort==4.2.5
commands =
    flake8 .
    isort --recursive --check-only --diff src/pip tests

[testenv:lint-py2]
basepython = python2
deps = {[lint]deps}
commands = {[lint]commands}

[testenv:lint-py3]
basepython = python3
deps = {[lint]deps}
commands = {[lint]commands}

[testenv:mypy]
basepython = python3
deps = mypy
commands =
    mypy src/pip
    mypy src/pip -2