From f1a853e115b00b3ec9dfc26c31d783a22b27bd40 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 29 Mar 2018 11:46:12 -0700 Subject: [PATCH] travis: simplify commands We do everything with tox, so the MODE environment variable is really just a tox environment identifier --- .travis.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7a411cb9d..3dc2bb6d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ before_cache: - rm -f $HOME/.cache/pip/log/debug.log git: depth: 1000 + install: # ~/.local/bin is on $PATH by default, but on OS-X, --user puts it elsewhere - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export PATH=$HOME/Library/Python/2.7/bin:$PATH; fi @@ -15,13 +16,14 @@ install: - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then pip install --upgrade codecov tox setuptools; fi - echo $PATH; which python; which pip; which tox - python misc/build_helpers/show-tool-versions.py + script: - - if [ "${MODE}" = "codechecks" ]; then tox -e codechecks; fi - - if [ "${MODE}" = "tests" ]; then tox; fi - - if [ "${MODE}" = "coverage" ]; then tox -e coverage; fi - - if [ "${MODE}" = "integration" ]; then /bin/bash integration/install-tor.sh && tox -e integration; fi + - if [ "${T}" = "integration" ]; then /bin/bash integration/install-tor.sh; fi + - tox -e ${T} + after_success: - - if [ "${MODE}" = "coverage" ]; then codecov; fi + - if [ "${T}" = "coverage" ]; then codecov; fi + notifications: email: false irc: @@ -31,17 +33,18 @@ notifications: template: - "%{repository}#%{build_number} [%{branch}: %{commit} by %{author}] %{message}" - "Changes: %{compare_url} | Details: %{build_url}" + matrix: include: - os: linux - env: MODE=coverage LANG=en_US.UTF-8 + env: T=coverage LANG=en_US.UTF-8 - os: linux - env: MODE=integration LANG=en_US.UTF-8 + env: T=integration LANG=en_US.UTF-8 - os: linux - env: MODE=codechecks LANG=en_US.UTF-8 + env: T=codechecks LANG=en_US.UTF-8 - os: linux - env: MODE=tests LANG=C + env: T=py27 LANG=C - os: osx - env: MODE=tests LANG=en_US.UTF-8 + env: T=py27 LANG=en_US.UTF-8 language: generic # "python" is not available on OS-X fast_finish: true