Skip to content

Commit 83bcf77

Browse files
authored
Merge pull request aws#87 from mattsb42-aws/dev-85-2
Freezing upstream test dependencies
2 parents 9127509 + 46f6797 commit 83bcf77

File tree

5 files changed

+192
-6
lines changed

5 files changed

+192
-6
lines changed

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,48 @@ sudo: false
22
language: python
33
matrix:
44
include:
5+
# CPython 2.7
56
- python: 2.7
67
env: TOXENV=py27-local-slow
78
- python: 2.7
89
env: TOXENV=py27-integ-slow
10+
# CPython 3.4
911
- python: 3.4
1012
env: TOXENV=py34-local-slow
1113
- python: 3.4
1214
env: TOXENV=py34-integ-slow
15+
# CPython 3.5
1316
- python: 3.5
1417
env: TOXENV=py35-local-slow
1518
- python: 3.5
1619
env: TOXENV=py35-integ-slow
20+
# CPython 3.6
1721
- python: 3.6
1822
env: TOXENV=py36-local-slow
1923
- python: 3.6
2024
env: TOXENV=py36-integ-slow
21-
# Disabled pending completion of integration
22-
# https://github.com/aws/aws-dynamodb-encryption-python/issues/66
25+
# Upstream tests
26+
- python: 2.7
27+
env: TOXENV=test-upstream-requirements-py27
28+
# MyPy
29+
# Disabled pending completion of integration
30+
# https://github.com/aws/aws-dynamodb-encryption-python/issues/66
2331
# - python: 3.6
2432
# env: TOXENV=mypy-py2
2533
# - python: 3.6
2634
# env: TOXENV=mypy-py3
35+
# Security
2736
- python: 3.6
2837
env: TOXENV=bandit
38+
# Linting
2939
- python: 3.6
3040
env: TOXENV=doc8
3141
- python: 3.6
3242
env: TOXENV=readme
3343
- python: 3.6
3444
env: TOXENV=docs
35-
# Disabled pending completion of cleanup
36-
# https://github.com/aws/aws-dynamodb-encryption-python/issues/67
45+
# Disabled pending completion of cleanup
46+
# https://github.com/aws/aws-dynamodb-encryption-python/issues/67
3747
# - python: 3.6
3848
# env: TOXENV=flake8
3949
# - python: 3.6

test/freeze-upstream-requirements.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# Minimal wrapper script for upstream requirements install and freeze.
3+
# We do this here rather than as tox commands because tox does not support output redirection.
4+
if [ -z ${1} ]; then
5+
exit 1
6+
fi
7+
8+
pip install -r requirements.txt
9+
pip install -r test/requirements.txt
10+
pip freeze > ${1}

test/upstream-requirements-py27.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
apipkg==1.5
2+
asn1crypto==0.24.0
3+
atomicwrites==1.2.0
4+
attrs==18.1.0
5+
aws-xray-sdk==0.95
6+
backports.ssl-match-hostname==3.5.0.1
7+
backports.tempfile==1.0
8+
backports.weakref==1.0.post1
9+
boto==2.49.0
10+
boto3==1.7.84
11+
botocore==1.10.84
12+
certifi==2018.8.24
13+
cffi==1.11.5
14+
chardet==3.0.4
15+
cookies==2.2.1
16+
coverage==4.5.1
17+
cryptography==2.3.1
18+
docker==3.5.0
19+
docker-pycreds==0.3.0
20+
docutils==0.14
21+
ecdsa==0.13
22+
enum34==1.1.6
23+
execnet==1.5.0
24+
funcsigs==1.0.2
25+
future==0.16.0
26+
futures==3.2.0
27+
hypothesis==3.63.0
28+
idna==2.7
29+
ipaddress==1.0.22
30+
Jinja2==2.10
31+
jmespath==0.9.3
32+
jsondiff==1.1.1
33+
jsonpickle==0.9.6
34+
MarkupSafe==1.0
35+
mock==2.0.0
36+
more-itertools==4.3.0
37+
moto==1.3.5
38+
pathlib2==2.3.2
39+
pbr==4.2.0
40+
pluggy==0.7.1
41+
py==1.6.0
42+
pyaml==17.12.1
43+
pycparser==2.18
44+
pycryptodome==3.6.6
45+
pytest==3.7.4
46+
pytest-cov==2.5.1
47+
pytest-forked==0.2
48+
pytest-mock==1.10.0
49+
pytest-xdist==1.23.0
50+
python-dateutil==2.7.3
51+
python-jose==2.0.2
52+
pytz==2018.5
53+
PyYAML==3.13
54+
requests==2.19.1
55+
responses==0.9.0
56+
s3transfer==0.1.13
57+
scandir==1.9.0
58+
six==1.11.0
59+
urllib3==1.23
60+
websocket-client==0.51.0
61+
Werkzeug==0.14.1
62+
wrapt==1.10.11
63+
xmltodict==0.11.0

test/upstream-requirements-py37.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
apipkg==1.5
2+
asn1crypto==0.24.0
3+
atomicwrites==1.2.0
4+
attrs==18.1.0
5+
aws-xray-sdk==0.95
6+
boto==2.49.0
7+
boto3==1.7.84
8+
botocore==1.10.84
9+
certifi==2018.8.24
10+
cffi==1.11.5
11+
chardet==3.0.4
12+
cookies==2.2.1
13+
coverage==4.5.1
14+
cryptography==2.3.1
15+
docker==3.5.0
16+
docker-pycreds==0.3.0
17+
docutils==0.14
18+
ecdsa==0.13
19+
execnet==1.5.0
20+
future==0.16.0
21+
hypothesis==3.63.0
22+
idna==2.7
23+
Jinja2==2.10
24+
jmespath==0.9.3
25+
jsondiff==1.1.1
26+
jsonpickle==0.9.6
27+
MarkupSafe==1.0
28+
mock==2.0.0
29+
more-itertools==4.3.0
30+
moto==1.3.5
31+
pbr==4.2.0
32+
pluggy==0.7.1
33+
py==1.6.0
34+
pyaml==17.12.1
35+
pycparser==2.18
36+
pycryptodome==3.6.6
37+
pytest==3.7.4
38+
pytest-cov==2.5.1
39+
pytest-forked==0.2
40+
pytest-mock==1.10.0
41+
pytest-xdist==1.23.0
42+
python-dateutil==2.7.3
43+
python-jose==2.0.2
44+
pytz==2018.5
45+
PyYAML==3.13
46+
requests==2.19.1
47+
responses==0.9.0
48+
s3transfer==0.1.13
49+
six==1.11.0
50+
urllib3==1.23
51+
websocket-client==0.51.0
52+
Werkzeug==0.14.1
53+
wrapt==1.10.11
54+
xmltodict==0.11.0

tox.ini

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ envlist =
55
flake8, pylint,
66
flake8-tests, pylint-tests,
77
flake8-examples, pylint-examples,
8-
vulture
8+
vulture,
9+
test-upstream-requirements-py{2,3}7
910

1011
# Additional environments:
1112
# vulture :: Runs vulture. Prone to false-positives.
@@ -21,7 +22,7 @@ envlist =
2122
# release :: Builds dist files and uploads to pypi pypirc profile.
2223

2324
[testenv:base-command]
24-
commands = pytest --basetemp={envtmpdir} -l --cov dynamodb_encryption_sdk {posargs}
25+
commands = pytest --basetemp={envtmpdir} -l --cov dynamodb_encryption_sdk test/ {posargs}
2526

2627
[testenv]
2728
passenv =
@@ -70,6 +71,54 @@ sitepackages = False
7071
deps = -rtest/requirements.txt
7172
commands = {[testenv:base-command]commands} -m "local and not slow and not veryslow and not nope"
7273

74+
# Collect requirements for use in upstream tests
75+
[testenv:freeze-upstream-requirements-base]
76+
sitepackages = False
77+
skip_install = True
78+
recreate = True
79+
deps =
80+
commands = {toxinidir}/test/freeze-upstream-requirements.sh
81+
82+
# Freeze for Python 2.7
83+
[testenv:freeze-upstream-requirements-py27]
84+
basepython = python2.7
85+
sitepackages = {[testenv:freeze-upstream-requirements-base]sitepackages}
86+
skip_install = {[testenv:freeze-upstream-requirements-base]skip_install}
87+
recreate = {[testenv:freeze-upstream-requirements-base]recreate}
88+
deps = {[testenv:freeze-upstream-requirements-base]deps}
89+
commands = {[testenv:freeze-upstream-requirements-base]commands} test/upstream-requirements-py27.txt
90+
91+
# Freeze for Python 3.7
92+
[testenv:freeze-upstream-requirements-py37]
93+
basepython = python3.7
94+
sitepackages = {[testenv:freeze-upstream-requirements-base]sitepackages}
95+
skip_install = {[testenv:freeze-upstream-requirements-base]skip_install}
96+
recreate = {[testenv:freeze-upstream-requirements-base]recreate}
97+
deps = {[testenv:freeze-upstream-requirements-base]deps}
98+
commands = {[testenv:freeze-upstream-requirements-base]commands} test/upstream-requirements-py37.txt
99+
100+
# Test frozen upstream requirements
101+
[testenv:test-upstream-requirements-base]
102+
sitepackages = False
103+
recreate = True
104+
commands = {[testenv:base-command]commands} -m "local and not slow and not veryslow and not nope"
105+
106+
# Test frozen upstream requirements for Python 2.7
107+
[testenv:test-upstream-requirements-py27]
108+
basepython = python2.7
109+
deps = -rtest/upstream-requirements-py27.txt
110+
sitepackages = {[testenv:test-upstream-requirements-base]sitepackages}
111+
recreate = {[testenv:test-upstream-requirements-base]recreate}
112+
commands = {[testenv:test-upstream-requirements-base]commands}
113+
114+
# Test frozen upstream requirements for Python 3.7
115+
[testenv:test-upstream-requirements-py37]
116+
basepython = python3.7
117+
deps = -rtest/upstream-requirements-py37.txt
118+
sitepackages = {[testenv:test-upstream-requirements-base]sitepackages}
119+
recreate = {[testenv:test-upstream-requirements-base]recreate}
120+
commands = {[testenv:test-upstream-requirements-base]commands}
121+
73122
# Verify that tests can be successfully run from the source build.
74123
[testenv:sourcebuildcheck]
75124
basepython = python3

0 commit comments

Comments
 (0)