forked from dateutil/dateutil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
130 lines (115 loc) · 3.85 KB
/
tox.ini
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[tox]
envlist = py27,
py33,
py34,
py35,
py36,
py37,
py38,
py39,
py310,
py311,
pypy,
pypy3,
coverage,
docs
minversion = 2.9.0
skip_missing_interpreters = true
isolated_build = true
[testenv:.package]
# no additional dependencies besides PEP 517 for building the package
# Needed as we are running with an old version of tox.
deps =
[testenv]
description = run the unit tests with pytest under {basepython}
setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* SYSTEM_* AGENT_* BUILD_* TF_BUILD
commands = python -m pytest {posargs: "{toxinidir}/tests" "{toxinidir}/docs" --cov-config="{toxinidir}/tox.ini" --cov=dateutil}
deps = -rrequirements-dev.txt
[testenv:py33]
description = run the unit tests with pytest under Python 3.3
setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* SYSTEM_* AGENT_* BUILD_* TF_BUILD
commands = python -m pytest {posargs: "{toxinidir}/tests" "{toxinidir}/docs" --cov-config="{toxinidir}/tox.ini" --cov=dateutil}
deps =
-rrequirements/3.3/requirements-dev.txt
-crequirements/3.3/constraints.txt
[testenv:coverage]
description = combine coverage data and create reports
deps = coverage
skip_install = True
changedir = {toxworkdir}
setenv = COVERAGE_FILE=.coverage
commands = python -m coverage erase
python -m coverage combine
python -m coverage report --rcfile={toxinidir}/tox.ini
python -m coverage xml
[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
deps = codecov
skip_install = True
commands = python -m codecov --file {toxworkdir}/coverage.xml
[testenv:dev]
description = DEV environment
usedevelop = True
commands = python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'
[coverage:run]
source = dateutil
[coverage:report]
skip_covered = True
show_missing = True
[testenv:precommit]
description = Run the pre-commit hooks on all files
passenv =
PRE_COMMIT*
deps =
pre-commit
commands =
pre-commit install -f --install-hooks
pre-commit run --all-files
[testenv:tz]
# Warning: This will modify the repository and is only intended to be run
# as part of the CI process, not locally.
description = Run the tests against the master of the tz database
basepython = python3.6
deps = -r {toxinidir}/requirements-dev.txt
setenv = DATEUTIL_TZPATH = {envtmpdir}/tzdir/usr/share/zoneinfo
changedir = {toxworkdir}
commands =
{toxinidir}/ci_tools/run_tz_master_env.sh {envtmpdir} {toxinidir}
[testenv:docs]
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
basepython = python3.6
deps = -r docs/requirements-docs.txt
{[testenv]deps}
commands = python -m sphinx -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -bhtml}
python -m sphinx -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -blinkcheck}
python setup.py check -r -s
[testenv:news]
description = Invoke towncrier to update the NEWS file
basepython = python3.7
passenv = *
deps = towncrier
commands =
towncrier {posargs}
[testenv:build]
description = Build an sdist and bdist
skip_install = true
passenv = *
deps = build[virtualenv] >= 0.3.0
commands =
python -m build --wheel --sdist --outdir dist .
[testenv:release]
description = Make a release; must be called after "build"
skip_install = True
deps =
twine
depends =
build
passenv =
TWINE_*
commands =
twine check {toxinidir}/dist/*
twine upload {toxinidir}/dist/* \
{posargs:-r {env:TWINE_REPOSITORY:testpypi} --non-interactive}