-
Notifications
You must be signed in to change notification settings - Fork 215
/
tox.ini
95 lines (85 loc) · 2.22 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist =
pycodestyle,
pylint,
py36,
pypy36,
py37,
pypy37,
py38,
pypy38,
py39,
py310,
py311,
coverage,
integration-tests
[gh-actions]
python =
3.6: py36, pycodestyle, pylint
pypy-3.6: pypy36
3.7: py37
pypy-3.7: pypy37
3.8: py38
pypy-3.8: pypy38
3.9: py39
3.10: py310
3.11: py311
[testenv]
commands =
pytest {posargs} --disable-pytest-warnings
deps = -rrequirements-test.txt
[testenv:pycodestyle]
commands =
pycodestyle --ignore=E501,W292 boxsdk setup.py
pycodestyle --ignore=E501,W292 test
deps =
pycodestyle
[testenv:pylint]
commands =
pylint --rcfile=.pylintrc boxsdk setup.py
# pylint:disable W0621(redefined-outer-name) - Using py.test fixtures always breaks this rule.
pylint --rcfile=.pylintrc test -d W0621 --ignore=mock_box
deps =
pylint
-rrequirements-test.txt
[testenv:coverage]
basepython = python3.6
commands =
py.test --cov boxsdk --cov-report term-missing test/unit test/integration
deps =
coverage
-rrequirements-test.txt
[testenv:py36-build]
description = Build the source and binary wheel packages for distribution.
pypi_dist_dir = {toxinidir}/pypi-dist
commands =
rm -rf "{[testenv:py36-build]pypi_dist_dir}"
{envpython} setup.py -vv \
sdist --formats=gztar --keep-temp --dist-dir="{[testenv:py36-build]pypi_dist_dir}" \
bdist_wheel --keep-temp --dist-dir="{[testenv:py36-build]pypi_dist_dir}"
skip_install = True
sitepackages = False
recreate = True
deps =
wheel
setuptools
virtualenv<20.22.0
allowlist_externals = rm
[testenv:py36-upload]
description = Upload packages to PyPI.
commands =
twine upload --config-file="{toxinidir}/.pypirc" {posargs} {[testenv:py36-build]pypi_dist_dir}/*
skip_install = True
sitepackages = False
recreate = True
deps =
twine
[testenv:integration-tests]
passenv = JWT_CONFIG_BASE_64 ADMIN_USER_ID
commands =
pytest {toxinidir}/test/integration_new {posargs} --disable-pytest-warnings
deps = -rrequirements-test.txt