1[tox]
2envlist = py27,
3          py33,
4          py34,
5          py35,
6          py36,
7          py37,
8          pypy,
9          pypy3,
10          coverage,
11          docs
12minversion = 2.9.0
13skip_missing_interpreters = true
14
15[testenv]
16description = run the unit tests with pytest under {basepython}
17setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
18passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_*
19commands = python -m pytest {posargs: "{toxinidir}/dateutil/test" --cov-config="{toxinidir}/tox.ini" --cov=dateutil}
20deps = -rrequirements-dev.txt
21
22[testenv:coverage]
23description = combine coverage data and create reports
24deps = coverage
25skip_install = True
26changedir = {toxworkdir}
27setenv = COVERAGE_FILE=.coverage
28commands = coverage erase
29           coverage combine
30           coverage report --rcfile={toxinidir}/tox.ini
31           coverage xml
32
33[testenv:codecov]
34description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
35deps = codecov
36skip_install = True
37commands = codecov --file {toxworkdir}/coverage.xml
38
39[testenv:dev]
40description = DEV environment
41usedevelop = True
42commands = python -m pip list --format=columns
43           python -c 'import sys; print(sys.executable)'
44
45[coverage:run]
46source = dateutil
47
48[coverage:report]
49skip_covered = True
50show_missing = True
51
52[testenv:tz]
53# Warning: This will modify the repository and is only intended to be run
54#          as part of the CI process, not locally.
55description = Run the tests against the master of the tz database
56basepython = python3.6
57deps = -r {toxinidir}/requirements-dev.txt
58setenv = DATEUTIL_TZPATH = {envtmpdir}/tzdir/usr/share/zoneinfo
59changedir = {toxworkdir}
60commands =
61    {toxinidir}/ci_tools/run_tz_master_env.sh {envtmpdir} {toxinidir}
62
63[testenv:docs]
64description = invoke sphinx-build to build the HTML docs, check that URIs are valid
65basepython = python3.6
66deps = -r docs/requirements-docs.txt
67       {[testenv]deps}
68commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -bhtml}
69           sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -blinkcheck}
70           python setup.py check -r -s
71