forked from pycontribs/jira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
134 lines (124 loc) · 3.33 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
131
132
133
134
[tox]
minversion = 3.8.0
requires =
tox-extra
tox-pyenv
envlist =
py39
py38
py37
py36
ignore_basepython_conflict = True
skip_missing_interpreters = True
skipdist = True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
[testenv]
usedevelop = True
# hide deps from stdout https://github.com/tox-dev/tox/issues/601
# list_dependencies_command=echo
extras =
cli
opt
test
sitepackages=False
commands=
git clean -xdf jira tests
python -m pip check
python make_local_jira_user.py
python -m pytest {posargs}
setenv =
TWINE_REPOSITORY_URL=https://nelli.khachatryan:AKCp8jR6yFyqZMJRA7mVHZVr65ccx3dWM31YpTAYWWNXvTNvqVQfcDvVZfrjb52z8TyvoqUDY@accolade.jfrog.io/artifactory/api/pypi/pypi-virtual
PIP_CONSTRAINT={toxinidir}/constraints.txt
PIP_LOG={envdir}/pip.log
PIP_DISABLE_PIP_VERSION_CHECK=1
# Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
CI_JIRA_URL=http://localhost:2990/jira
CI_JIRA_ADMIN=admin
CI_JIRA_ADMIN_PASSWORD=admin
CI_JIRA_USER=jira_user
CI_JIRA_USER_FULL_NAME=Newly Created CI User
CI_JIRA_USER_PASSWORD=jira
CI_JIRA_ISSUE=Task
passenv =
CI
CI_JIRA_*
CURL_CA_BUNDLE
PIP_*
REQUESTS_CA_BUNDLE
SSL_CERT_FILE
TWINE_*
XDG_CACHE_HOME
# For Windows users, getpass.get_user() needs USERNAME
USERNAME
whitelist_externals =
git
[testenv:deps]
description = Update dependency lock files
# Force it to use oldest supported version of python or we would lose ability
# to get pinning correctly.
basepython = python3.6
deps =
pip-tools >= 6.2.0
pre-commit >= 2.13.0
commands =
pip-compile --upgrade -o constraints.txt setup.cfg --extra cli --extra docs --extra opt --extra async --extra test
{envpython} -m pre_commit autoupdate
[testenv:docs]
extras =
docs
# changedir=docs
usedevelop = False
skipdist = False
setenv =
PYTHONHTTPSVERIFY=0
commands =
sphinx-build \
-a -n -v -W --keep-going \
-b html --color \
-d "{toxworkdir}/docs_doctree" \
docs/ "{toxworkdir}/docs_out"
# Print out the output docs dir and a way to serve html:
python -c \
'import pathlib; '\
'docs_dir = pathlib.Path(r"{toxworkdir}") / "docs_out"; index_file = docs_dir / "index.html"; print(f"\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n")'
[testenv:pkg]
deps =
build>=0.3.1.post1
pip>=21.1.1
setuptools>=56.2.0
twine>=3.4.1
wheel>=0.36.2
commands =
git clean -xdf dist
python setup.py check -m -s
# disabled due to errors with older setuptools:
# python setup.py sdist bdist_wheel
python -m build --wheel --sdist .
python -m twine check dist/*
usedevelop = false
[testenv:lint]
deps = pre-commit>=1.17.0
commands=
python -m pre_commit run --color=always {posargs:--all}
setenv =
PIP_CONSTRAINT=/dev/null
skip_install = true
usedevelop = false
[testenv:maintenance]
# this will obliterate your jira instance, used to clean the CI server
commands=
python examples/maintenance.py
[testenv:publish]
description = Publish package
envdir = {toxworkdir}/pkg
deps = {[testenv:pkg]deps}
commands =
{[testenv:pkg]commands}
twine upload dist/*
usedevelop = false