From 5f91d90ba4f8585d6a24cd1734c494462c52ffab Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 6 May 2015 09:48:35 -0400 Subject: [PATCH] Move toward tox testing for TravisCI. This is used by Bioblend, Pulsar, and Planemo and provides several benefits: - More flexibility then baking logic directly into .travis.yml - Makes the CI testing more portable - Generally leads to more parallelism on Travis - "prettier" display of results (things are broken down by the kind of test). For the last two points - compare https://travis-ci.org/galaxyproject/galaxy and https://travis-ci.org/galaxyproject/planemo. I would like to add the qunit tests to Travis and I see this a good first step toward being able to do that well. --- .travis.yml | 18 +++++++++++------- tox.ini | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml index 202e6df26f7..07c577b414c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,13 @@ language: python -python: - - "2.7" - - "2.6" +python: 2.7 +env: + - TOX_ENV=py27-lint + - TOX_ENV=py26-lint + - TOX_ENV=py27-unit + - TOX_ENV=py26-unit + install: - - virtualenv .venv - - . .venv/bin/activate - - pip install flake8 -script: ./.ci/flake8_wrapper.sh && ./run_tests.sh -u + - pip install tox + +script: tox -e $TOX_ENV + diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000000..7f5b9654ac4 --- /dev/null +++ b/tox.ini @@ -0,0 +1,22 @@ +[tox] +envlist = py27-lint, py26-lint, py27-unit, py26-unit +skipsdist = True + +[testenv:py27-lint] +commands = bash .ci/flake8_wrapper.sh +whitelist_externals = bash +deps = flake8 + +[testenv:py26-lint] +commands = bash .ci/flake8_wrapper.sh +whitelist_externals = bash +deps = flake8 + +[testenv:py27-unit] +commands = bash run_tests.sh -u +whitelist_externals = bash + +[testenv:py26-unit] +commands = bash run_tests.sh -u +whitelist_externals = bash +