dateutil
/
tox.ini
133 строки · 3.9 Кб
1[tox]
2envlist = py27,
3py33,
4py34,
5py35,
6py36,
7py37,
8py38,
9py39,
10py310,
11py311,
12pypy,
13pypy3,
14coverage,
15docs
16minversion = 2.9.0
17skip_missing_interpreters = true
18isolated_build = true
19requires =
20tox<4
21virtualenv<20.22.0
22
23[testenv:.package]
24# no additional dependencies besides PEP 517 for building the package
25# Needed as we are running with an old version of tox.
26deps =
27
28[testenv]
29description = run the unit tests with pytest under {basepython}
30setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
31passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI APPVEYOR APPVEYOR_* CODECOV_* SYSTEM_* AGENT_* BUILD_* TF_BUILD
32commands = python -m pytest {posargs: "{toxinidir}/tests" "{toxinidir}/docs" --cov-config="{toxinidir}/tox.ini" --cov=dateutil}
33deps = -rrequirements-dev.txt
34
35[testenv:py33]
36description = run the unit tests with pytest under Python 3.3
37setenv = COVERAGE_FILE={toxworkdir}/.coverage.{envname}
38passenv = DATEUTIL_MAY_CHANGE_TZ TOXENV CI APPVEYOR APPVEYOR_* CODECOV_* SYSTEM_* AGENT_* BUILD_* TF_BUILD
39commands = python -m pytest {posargs: "{toxinidir}/tests" "{toxinidir}/docs" --cov-config="{toxinidir}/tox.ini" --cov=dateutil}
40deps =
41-rrequirements/3.3/requirements-dev.txt
42-crequirements/3.3/constraints.txt
43
44[testenv:coverage]
45description = combine coverage data and create reports
46deps = coverage
47skip_install = True
48changedir = {toxworkdir}
49setenv = COVERAGE_FILE=.coverage
50commands = python -m coverage erase
51python -m coverage combine
52python -m coverage report --rcfile={toxinidir}/tox.ini
53python -m coverage xml
54
55[testenv:codecov]
56description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)
57deps = codecov
58skip_install = True
59commands = python -m codecov --file {toxworkdir}/coverage.xml
60
61[testenv:dev]
62description = DEV environment
63usedevelop = True
64commands = python -m pip list --format=columns
65python -c 'import sys; print(sys.executable)'
66
67[coverage:run]
68source = dateutil
69
70[coverage:report]
71skip_covered = True
72show_missing = True
73
74[testenv:precommit]
75description = Run the pre-commit hooks on all files
76passenv =
77PRE_COMMIT*
78deps =
79pre-commit
80commands =
81pre-commit install -f --install-hooks
82pre-commit run --all-files
83
84[testenv:tz]
85# Warning: This will modify the repository and is only intended to be run
86# as part of the CI process, not locally.
87description = Run the tests against the master of the tz database
88basepython = python3.6
89deps = -r {toxinidir}/requirements-dev.txt
90setenv = DATEUTIL_TZPATH = {envtmpdir}/tzdir/usr/share/zoneinfo
91changedir = {toxworkdir}
92commands =
93{toxinidir}/ci_tools/run_tz_master_env.sh {envtmpdir} {toxinidir}
94
95[testenv:docs]
96description = invoke sphinx-build to build the HTML docs, check that URIs are valid
97basepython = python3.6
98deps = -r docs/requirements-docs.txt
99{[testenv]deps}
100commands = python -m sphinx -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -bhtml}
101python -m sphinx -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" {posargs:-W --color -blinkcheck}
102python setup.py check -r -s
103
104
105[testenv:news]
106description = Invoke towncrier to update the NEWS file
107basepython = python3.11
108passenv = *
109deps = towncrier
110commands =
111towncrier {posargs}
112
113[testenv:build]
114description = Build an sdist and bdist
115skip_install = true
116passenv = *
117deps = build[virtualenv] >= 0.3.0
118commands =
119python -m build --wheel --sdist --outdir dist .
120
121[testenv:release]
122description = Make a release; must be called after "build"
123skip_install = True
124deps =
125twine
126depends =
127build
128passenv =
129TWINE_*
130commands =
131twine check {toxinidir}/dist/*
132twine upload {toxinidir}/dist/* \
133{posargs:-r {env:TWINE_REPOSITORY:testpypi} --non-interactive}
134