From 5d30b907829088904fdc07cd80d08212570b03c1 Mon Sep 17 00:00:00 2001 From: Donald Stufft <donald@stufft.io> Date: Tue, 24 Sep 2013 21:44:24 -0400 Subject: [PATCH] Use tox to test --- .travis.yml | 36 +++++++++++++++++++----------------- tox.ini | 8 ++++++++ 2 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml index b9daa5fc..242881fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,22 @@ language: python -python: - - "2.6" - - "2.7" - - "3.2" - - "3.3" - # - "pypy" # Travis only has PyPy 1.9, cffi requires 2.0 (Unreleased) +python: 2.7 +env: + - TOX_ENV=py26 + - TOX_ENV=py27 + - TOX_ENV=py32 + - TOX_ENV=py33 + - TOX_ENV=pypy + install: - - pip install invoke - - pip install file://$PWD#egg=pynacl[tests] - - invoke sodium.install + - "[[ ${TOX_ENV} == pypy ]] && sudo add-apt-repository -y ppa:pypy/ppa || true" + - "[[ ${TOX_ENV} == pypy ]] && sudo apt-get -y update && sudo apt-get -y install pypy || true" + # This is required because we need to get rid of the Travis installed PyPy + # or it'll take precedence over the PPA installed one. + - "[[ ${TOX_ENV} == pypy ]] && sudo rm -rf /usr/local/pypy/bin || true" + - pip install tox coveralls + script: - - invoke tests -env: - global: - - LD_LIBRARY_PATH=/usr/local/lib - - LD_RUN_PATH=/usr/local/lib -branches: - only: - - master + - tox -e $TOX_ENV + +after_success: + - coveralls diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..f9e837d8 --- /dev/null +++ b/tox.ini @@ -0,0 +1,8 @@ +[tox] +envlist = py26,py27,pypy,py32,py33 + +[testenv] +deps = + pytest + pytest-cov +commands = py.test --cov=nacl/ -- GitLab