Skip to content
Closed
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
97 changes: 36 additions & 61 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,56 @@ language: python
os:
- linux

python:
- "pypy"
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "3.4"
env:
matrix:
# Supported environments:
- TOX_ENV=pypy
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py32
- TOX_ENV=py33

# Also run the tests against cryptography master.
- TOX_ENV=pypy-cryptographymaster
- TOX_ENV=py26-cryptographymaster
- TOX_ENV=py27-cryptographymaster
- TOX_ENV=py32-cryptographymaster
- TOX_ENV=py33-cryptographymaster

# Also run at least a little bit against an older version of OpenSSL.
- TOX_ENV=py27 OPENSSL=0.9.8

matrix:
include:
# Also run the tests against cryptography master.
- python: "2.6"
env:
CRYPTOGRAPHY_GIT_MASTER=true
- python: "2.7"
env:
CRYPTOGRAPHY_GIT_MASTER=true
- python: "3.2"
env:
CRYPTOGRAPHY_GIT_MASTER=true
- python: "3.3"
env:
CRYPTOGRAPHY_GIT_MASTER=true
- python: "3.4"
env:
CRYPTOGRAPHY_GIT_MASTER=true
- python: "pypy"
env:
CRYPTOGRAPHY_GIT_MASTER=true

# Also run at least a little bit against an older version of OpenSSL.
- python: "2.7"
env:
OPENSSL=0.9.8

# Let the cryptography master builds fail because they might be triggered by
# cryptography changes beyond our control.
allow_failures:
- env:
CRYPTOGRAPHY_GIT_MASTER=true
- env:
OPENSSL=0.9.8
# Let the cryptography master builds fail, because they might be
# triggered by cryptography changes beyond our control.
- env: TOX_ENV=pypy-cryptographymaster
- env: TOX_ENV=py26-cryptographymaster
- env: TOX_ENV=py27-cryptographymaster
- env: TOX_ENV=py32-cryptographymaster
- env: TOX_ENV=py33-cryptographymaster

before_install:
- if [ -n "$CRYPTOGRAPHY_GIT_MASTER" ]; then pip install git+https://github.com/pyca/cryptography.git;fi
- env: TOX_ENV=py27 OPENSSL=0.9.8

install:
# Install the wheel library explicitly here. It is not really a setup
# dependency. It is not an install dependency. It is only a dependency for
# the script directive below - because we want to exercise wheel building on
# travis.
- pip install wheel

# Also install some tools for measuring code coverage and sending the results
# to coveralls.
- pip install coveralls coverage

script:
# In some builds, install an old version of OpenSSL.
- |
if [[ "${OPENSSL}" == "0.9.8" ]]; then
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main"
sudo apt-get -y update
sudo apt-get install -y --force-yes libssl-dev/lucid
fi
- |
pip install -e .
- |
coverage run --branch --source=OpenSSL setup.py bdist_wheel test
- |
coverage report -m
- |
python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))"

# Tox actually builds our individual testing virtualenvs.
- pip install tox

- pip install coveralls

script:
- tox -e $TOX_ENV

after_success:
- coveralls
- coveralls

notifications:
email: false
72 changes: 70 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,77 @@
envlist = pypy,py26,py27,py32,py33

[testenv]
deps =
# Only required to build wheels as part of test cycle:
wheel==0.23.0
coverage==3.7.1
setenv =
# Do not allowed the executing environment to pollute the test environment
# with extra packages.
PYTHONPATH=
# The standard library unittest module can run tests on Python 2.7 and newer
commands = python setup.py test
commands =
# The standard library unittest module can run tests on Python 2.7 and newer
coverage run --branch --source=OpenSSL setup.py test
coverage report --show-missing
python setup.py bdist_wheel
python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))"

[testenv:pypy]
basepython = pypy
deps =
{[testenv]deps}
cryptography==0.4

[testenv:py26]
basepython = python2.6
deps =
{[testenv]deps}
cryptography==0.4

[testenv:py27]
basepython = python2.7
deps =
{[testenv]deps}
cryptography==0.4

[testenv:py32]
basepython = python3.2
deps =
{[testenv]deps}
cryptography==0.4

[testenv:py33]
basepython = python3.3
deps =
{[testenv]deps}
cryptography==0.4

[testenv:pypy-cryptographymaster]
basepython = pypy
deps =
{[testenv]deps}
-egit+https://github.com/pyca/cryptography.git#egg=cryptography

[testenv:py26-cryptographymaster]
basepython = python2.6
deps =
{[testenv]deps}
-egit+https://github.com/pyca/cryptography.git#egg=cryptography

[testenv:py27-cryptographymaster]
basepython = python2.7
deps =
{[testenv]deps}
-egit+https://github.com/pyca/cryptography.git#egg=cryptography

[testenv:py32-cryptographymaster]
basepython = python3.2
deps =
{[testenv]deps}
-egit+https://github.com/pyca/cryptography.git#egg=cryptography

[testenv:py33-cryptographymaster]
basepython = python3.3
deps =
{[testenv]deps}
-egit+https://github.com/pyca/cryptography.git#egg=cryptography