forked from jantman/awslimitchecker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
170 lines (160 loc) · 5.28 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[tox]
envlist = py35,py36,py37,py38,py39,pypy,pypy3,docs,localdocs,integration3,docker
[testenv]
deps =
cov-core
coverage
execnet
pycodestyle
py
pytest<6.0.0
pytest-cache
pytest-cov
pytest-pycodestyle
pytest-flakes
mock
freezegun
boto3
pytest-blockage
virtualenv
onetimepass==1.0.1
testfixtures
passenv=TRAVIS*
setenv =
TOXINIDIR={toxinidir}
TOXDISTDIR={distdir}
# when we call ``awslimitchecker.tests.services.result_fixtures.get_boto3_resource_model()``
# botocore.session.Session will attempt HTTP requests to 169.254.169.254 to
# retrieve Instance Metadata and IAM roles. In order to prevent this,
# we simply export bogus AWS keys.
AWS_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_SECRET_ACCESS_KEY=MightAsWellNotHaveThisVarSetHere
AWS_DEFAULT_REGION=us-east-1
AWS_MAIN_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_MAIN_SECRET_ACCESS_KEY=MightAsWellNotHaveThisVarSetHere
AWS_MASTER_ACCOUNT_ID=MightAsWellNotHaveThisVarSetHere
AWS_EXTERNAL_ID=MightAsWellNotHaveThisVarSetHere
AWS_INTEGRATION_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_INTEGRATION_SECRET_KEY=MightAsWellNotHaveThisVarSetHere
AWS_MFA_EXTERNAL_ID=MightAsWellNotHaveThisVarSetHere
AWS_MFA_INTEGRATION_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_MFA_INTEGRATION_SECRET_KEY=MightAsWellNotHaveThisVarSetHere
AWS_MFA_SERIAL=MightAsWellNotHaveThisVarSetHere
AWS_MFA_SECRET=MightAsWellNotHaveThisVarSetHere
sitepackages = False
whitelist_externals = env test
commands =
python --version
virtualenv --version
pip --version
pip freeze
py.test -rxs -vv --durations=10 --pycodestyle --flakes --blockage -m "not integration" --cov-report term-missing --cov-report xml --cov-report html --cov-config {toxinidir}/.coveragerc --cov=awslimitchecker {posargs} awslimitchecker
# always recreate the venv
recreate = True
[testenv:docs]
# this really just makes sure README.rst will parse on pypi
passenv = TRAVIS* CONTINUOUS_INTEGRATION AWS* READTHEDOCS*
setenv =
TOXINIDIR={toxinidir}
TOXDISTDIR={distdir}
CI=true
# when we call ``awslimitchecker.tests.services.result_fixtures.get_boto3_resource_model()``
# botocore.session.Session will attempt HTTP requests to 169.254.169.254 to
# retrieve Instance Metadata and IAM roles. In order to prevent this,
# we simply export bogus AWS keys.
AWS_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_SECRET_ACCESS_KEY=MightAsWellNotHaveThisVarSetHere
AWS_DEFAULT_REGION=us-east-1
AWS_MAIN_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_MAIN_SECRET_ACCESS_KEY=MightAsWellNotHaveThisVarSetHere
AWS_MASTER_ACCOUNT_ID=MightAsWellNotHaveThisVarSetHere
AWS_EXTERNAL_ID=MightAsWellNotHaveThisVarSetHere
AWS_INTEGRATION_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_INTEGRATION_SECRET_KEY=MightAsWellNotHaveThisVarSetHere
AWS_MFA_EXTERNAL_ID=MightAsWellNotHaveThisVarSetHere
AWS_MFA_INTEGRATION_ACCESS_KEY_ID=MightAsWellNotHaveThisVarSetHere
AWS_MFA_INTEGRATION_SECRET_KEY=MightAsWellNotHaveThisVarSetHere
AWS_MFA_SERIAL=MightAsWellNotHaveThisVarSetHere
AWS_MFA_SECRET=MightAsWellNotHaveThisVarSetHere
deps =
docutils
pygments
sphinx
sphinx_rtd_theme
onetimepass==1.0.1
basepython = python3.9
commands =
python --version
virtualenv --version
pip --version
pip freeze
rst2html.py --halt=2 README.rst /dev/null
sphinx-apidoc awslimitchecker awslimitchecker/tests -o {toxinidir}/docs/source -e -f -M --private
# link check
# -n runs in nit-picky mode
# -W turns warnings into errors
sphinx-build -a -n -W -b linkcheck {toxinidir}/docs/source {toxinidir}/docs/build/html
# build
sphinx-build -a -n -W -b html {toxinidir}/docs/source {toxinidir}/docs/build/html
[testenv:localdocs]
# this really just makes sure README.rst will parse on pypi
passenv = AWS*
setenv =
TOXINIDIR={toxinidir}
TOXDISTDIR={distdir}
deps =
docutils
pygments
sphinx
sphinx_rtd_theme
onetimepass==1.0.1
basepython = python3.9
commands =
python --version
virtualenv --version
pip --version
pip freeze
rst2html.py --halt=2 README.rst /dev/null
sphinx-apidoc awslimitchecker awslimitchecker/tests -o {toxinidir}/docs/source -e -f -M --private
python {toxinidir}/docs/build_generated_docs.py
# link check
# -n runs in nit-picky mode
# -W turns warnings into errors
sphinx-build -a -n -W -b linkcheck {toxinidir}/docs/source {toxinidir}/docs/build/html
# build
sphinx-build -a -n -W -b html {toxinidir}/docs/source {toxinidir}/docs/build/html
[testenv:integration3]
deps =
execnet
py
pytest>=2.8.3
pytest-cache
mock
boto3
onetimepass==1.0.1
testfixtures
freezegun
passenv = CI TRAVIS* CONTINUOUS_INTEGRATION AWS*
setenv =
TOXINIDIR={toxinidir}
TOXDISTDIR={distdir}
basepython = python3.9
sitepackages = False
whitelist_externals = env test
commands =
python --version
virtualenv --version
pip --version
pip freeze
py.test -rxs -vv --durations=10 -m "integration" awslimitchecker
[testenv:docker]
basepython = python3.9
setenv =
TOXINIDIR={toxinidir}
TOXDISTDIR={distdir}
commands =
python --version
virtualenv --version
pip --version
pip freeze
{toxinidir}/docker_build.sh dockerbuildtest