-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtox.ini
154 lines (141 loc) · 3.31 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Tox global configuration
#
[tox]
envlist = py{39,310,311,312,313}-{bst-fixed,bst-master}
skip_missing_interpreters = true
#
# Defaults for all environments
#
# Anything specified here is inherited by the sections
#
[testenv]
commands =
bst --version
./tests/bzr_wrapper {envdir}/bin
pytest --basetemp {envtmpdir} {posargs}
deps =
-rrequirements/test-requirements.txt
-rrequirements/plugin-requirements.txt
git+https://github.com/apache/buildstream@{env:BST_VERSION}
passenv =
ARTIFACT_CACHE_SERVICE
BST_FORCE_BACKEND
BST_FORCE_SANDBOX
GI_TYPELIB_PATH
INTEGRATION_CACHE
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
PYTEST_*
REMOTE_EXECUTION_SERVICE
SOURCE_CACHE_SERVICE
SSL_CERT_FILE
#
# These keys are not inherited by any other sections
#
setenv =
py{39,310,311,312,313}: XDG_CACHE_HOME = {envtmpdir}/cache
py{39,310,311,312,313}: XDG_CONFIG_HOME = {envtmpdir}/config
py{39,310,311,312,313}: XDG_DATA_HOME = {envtmpdir}/share
!master: BST_VERSION = 2.4.0
master: BST_VERSION = master
allowlist_externals =
py{39,310,311,312,313}:
mv
mkdir
./tests/bzr_wrapper
#
# Code formatters
#
[testenv:format]
skip_install = True
deps =
black==22.3.0
commands =
black {posargs: src tests setup.py}
#
# Code format checkers
#
[testenv:format-check]
skip_install = True
deps =
black==22.3.0
commands =
black --check --diff {posargs: src tests setup.py}
#
# Running linters
#
[testenv:lint]
commands_pre =
# Build C extensions to allow Pylint to analyse them
{envpython} setup.py build_ext --inplace
commands =
pylint {posargs: buildstream_plugins tests setup.py}
#
# Running static type checkers
#
[testenv:mypy]
skip_install = True
commands =
mypy {posargs}
deps =
mypy==1.13.0
types-protobuf
types-python-dateutil
types-setuptools
types-ujson
-rrequirements/plugin-requirements.txt
-rrequirements/test-requirements.txt
-rrequirements/mypy-requirements.txt
git+https://github.com/apache/buildstream@{env:BST_VERSION}
#
# Building documentation
#
[testenv:docs]
commands =
make -C doc
# sphinx_rtd_theme < 0.4.2 breaks search functionality for Sphinx >= 1.8
deps =
sphinx >= 1.8.5
sphinx_rtd_theme >= 0.4.2
-rrequirements/plugin-requirements.txt
git+https://github.com/apache/buildstream@{env:BST_VERSION}
passenv =
BST_FORCE_SESSION_REBUILD
BST_SOURCE_CACHE
HOME
LANG
LC_ALL
allowlist_externals =
make
#
# Publish a release, make sure to update the version in setup.py first
#
[testenv:release]
skip_install = true
commands =
python3 setup.py sdist bdist_wheel
twine upload -r pypi dist/*
deps =
twine
wheel
passenv =
TWINE_USERNAME
TWINE_PASSWORD