-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
74 lines (67 loc) · 2.21 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
# 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,
py37,
py38,
py39,
py310,
py311,
coverage
[testenv]
commands =
pytest {posargs} --disable-pytest-warnings
deps = -rrequirements-test.txt
allowlist_externals = pytest
passenv = JWT_CONFIG_BASE_64,ADMIN_USER_ID,CLIENT_ID,CLIENT_SECRET,USER_ID,ENTERPRISE_ID,BOX_FILE_REQUEST_ID,BOX_EXTERNAL_USER_EMAIL,WORKFLOW_FOLDER_ID,APP_ITEM_ASSOCIATION_FILE_ID,APP_ITEM_ASSOCIATION_FOLDER_ID
[testenv:pycodestyle]
commands =
pycodestyle --ignore=E501,W292 box_sdk setup.py
pycodestyle --ignore=E501,W292 test
deps =
pycodestyle
[testenv:pylint]
commands =
pylint --rcfile=.pylintrc box_sdk 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.10
commands =
py.test --cov box_sdk_gen --cov-report term-missing test/
deps =
coverage
-rrequirements-test.txt
passenv = JWT_CONFIG_BASE_64,ADMIN_USER_ID,CLIENT_ID,CLIENT_SECRET,USER_ID,ENTERPRISE_ID,BOX_FILE_REQUEST_ID,BOX_EXTERNAL_USER_EMAIL,WORKFLOW_FOLDER_ID,APP_ITEM_ASSOCIATION_FILE_ID,APP_ITEM_ASSOCIATION_FOLDER_ID
[testenv:py310-build]
description = Build the source and binary wheel packages for distribution.
pypi_dist_dir = {toxinidir}/pypi-dist
commands =
rm -rf "{[testenv:py310-build]pypi_dist_dir}"
{envpython} setup.py -vv \
sdist --formats=gztar --keep-temp --dist-dir="{[testenv:py310-build]pypi_dist_dir}" \
bdist_wheel --keep-temp --dist-dir="{[testenv:py310-build]pypi_dist_dir}"
skip_install = True
sitepackages = False
recreate = True
deps =
wheel
setuptools
allowlist_externals = rm
[testenv:py310-upload]
description = Upload packages to PyPI.
commands =
twine upload --config-file="{toxinidir}/.pypirc" {posargs} {[testenv:py310-build]pypi_dist_dir}/*
skip_install = True
sitepackages = False
recreate = True
deps =
twine