Skip to content

Freeze upstream test requirements #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ sudo: false
language: python
matrix:
include:
# CPython 2.7
- python: 2.7
env: TOXENV=py27-local
- python: 2.7
Expand All @@ -10,6 +11,7 @@ matrix:
env: TOXENV=py27-accept
- python: 2.7
env: TOXENV=py27-examples
# CPython 3.4
- python: 3.4
env: TOXENV=py34-local
- python: 3.4
Expand All @@ -18,6 +20,7 @@ matrix:
env: TOXENV=py34-accept
- python: 3.4
env: TOXENV=py34-examples
# CPython 3.5
- python: 3.5
env: TOXENV=py35-local
- python: 3.5
Expand All @@ -26,6 +29,7 @@ matrix:
env: TOXENV=py35-accept
- python: 3.5
env: TOXENV=py35-examples
# CPython 3.6
- python: 3.6
env: TOXENV=py36-local
- python: 3.6
Expand All @@ -34,6 +38,9 @@ matrix:
env: TOXENV=py36-accept
- python: 3.6
env: TOXENV=py36-examples
# CPython 3.7
# xenial + sudo are currently needed to get 3.7
# https://github.com/travis-ci/travis-ci/issues/9815
- python: 3.7
env: TOXENV=py37-local
dist: xenial
Expand All @@ -50,10 +57,21 @@ matrix:
env: TOXENV=py37-examples
dist: xenial
sudo: true
# Upstream tests
- python: 3.6
env: TOXENV=nocmk
- python: 2.7
env: TOXENV=test-upstream-requirements-py27
# xenial + sudo are currently needed to get 3.7
# https://github.com/travis-ci/travis-ci/issues/9815
- python: 3.7
env: TOXENV=test-upstream-requirements-py37
dist: xenial
sudo: true
# Security
- python: 3.6
env: TOXENV=bandit
# Linting and autoformatting
- python: 3.6
env: TOXENV=doc8
- python: 3.6
Expand Down
10 changes: 10 additions & 0 deletions test/freeze-upstream-requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# Minimal wrapper script for upstream requirements install and freeze.
# We do this here rather than as tox commands because tox does not support output redirection.
if [ -z ${1} ]; then
exit 1
fi

pip install -r requirements.txt
pip install -r test/requirements.txt
pip freeze > ${1}
31 changes: 31 additions & 0 deletions test/upstream-requirements-py27.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
asn1crypto==0.24.0
atomicwrites==1.2.1
attrs==18.1.0
boto3==1.8.4
botocore==1.11.4
cffi==1.11.5
coverage==4.5.1
cryptography==2.3.1
docutils==0.14
enum34==1.1.6
funcsigs==1.0.2
futures==3.2.0
idna==2.7
ipaddress==1.0.22
jmespath==0.9.3
mock==2.0.0
more-itertools==4.3.0
pathlib2==2.3.2
pbr==4.2.0
pluggy==0.7.1
py==1.6.0
pycparser==2.18
pytest==3.7.4
pytest-cov==2.5.1
pytest-mock==1.10.0
python-dateutil==2.7.3
s3transfer==0.1.13
scandir==1.9.0
six==1.11.0
urllib3==1.23
wrapt==1.10.11
25 changes: 25 additions & 0 deletions test/upstream-requirements-py37.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
asn1crypto==0.24.0
atomicwrites==1.2.1
attrs==18.1.0
boto3==1.8.4
botocore==1.11.4
cffi==1.11.5
coverage==4.5.1
cryptography==2.3.1
docutils==0.14
idna==2.7
jmespath==0.9.3
mock==2.0.0
more-itertools==4.3.0
pbr==4.2.0
pluggy==0.7.1
py==1.6.0
pycparser==2.18
pytest==3.7.4
pytest-cov==2.5.1
pytest-mock==1.10.0
python-dateutil==2.7.3
s3transfer==0.1.13
six==1.11.0
urllib3==1.23
wrapt==1.10.11
48 changes: 48 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,54 @@ sitepackages = False
deps = -rtest/requirements.txt
commands = {[testenv:base-command]commands} test/ -m local

# Collect requirements for use in upstream tests
[testenv:freeze-upstream-requirements-base]
sitepackages = False
skip_install = True
recreate = True
deps =
commands = {toxinidir}/test/freeze-upstream-requirements.sh

# Freeze for Python 2.7
[testenv:freeze-upstream-requirements-py27]
basepython = python2.7
sitepackages = {[testenv:freeze-upstream-requirements-base]sitepackages}
skip_install = {[testenv:freeze-upstream-requirements-base]skip_install}
recreate = {[testenv:freeze-upstream-requirements-base]recreate}
deps = {[testenv:freeze-upstream-requirements-base]deps}
commands = {[testenv:freeze-upstream-requirements-base]commands} test/upstream-requirements-py27.txt

# Freeze for Python 3.7
[testenv:freeze-upstream-requirements-py37]
basepython = python3.7
sitepackages = {[testenv:freeze-upstream-requirements-base]sitepackages}
skip_install = {[testenv:freeze-upstream-requirements-base]skip_install}
recreate = {[testenv:freeze-upstream-requirements-base]recreate}
deps = {[testenv:freeze-upstream-requirements-base]deps}
commands = {[testenv:freeze-upstream-requirements-base]commands} test/upstream-requirements-py37.txt

# Test frozen upstream requirements
[testenv:test-upstream-requirements-base]
sitepackages = False
recreate = True
commands = {[testenv:base-command]commands} test/ -m local

# Test frozen upstream requirements for Python 2.7
[testenv:test-upstream-requirements-py27]
basepython = python2.7
deps = -rtest/upstream-requirements-py27.txt
sitepackages = {[testenv:test-upstream-requirements-base]sitepackages}
recreate = {[testenv:test-upstream-requirements-base]recreate}
commands = {[testenv:test-upstream-requirements-base]commands}

# Test frozen upstream requirements for Python 3.7
[testenv:test-upstream-requirements-py37]
basepython = python3.7
deps = -rtest/upstream-requirements-py37.txt
sitepackages = {[testenv:test-upstream-requirements-base]sitepackages}
recreate = {[testenv:test-upstream-requirements-base]recreate}
commands = {[testenv:test-upstream-requirements-base]commands}

# Linters
[testenv:flake8]
basepython = python3
Expand Down