From bde12951b0592c6e10bd0bd7cad2aa6aa6679e3f Mon Sep 17 00:00:00 2001 From: Jon Banafato Date: Thu, 5 Nov 2015 22:42:10 -0500 Subject: [PATCH] Improve travis builds Add caching, run tox environments separately, and don't run two builds for each pull request --- .travis.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d66429c..a2d6909 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,11 @@ language: python python: - "2.7" +# Cache pip requirements for faster builds +cache: + directories: + - $HOME/.cache/pip + install: - sudo apt-get purge -y nodejs - sudo apt-get install -qqy python-software-properties @@ -18,8 +23,19 @@ install: # Python test requirements - pip install tox +# Run each tox environment separately +env: + - TOX_ENV=py27 + - TOX_ENV=pep8 + before_script: - export PYTHONPATH=$PYTHONPATH:/usr/share/asciidoc/ script: - - tox \ No newline at end of file + - tox -e $TOX_ENV + +# Only build for the master branch +# Note that this does not prevent pull request builds +branches: + only: + master