travis: simplify commands

We do everything with tox, so the MODE environment variable is really just a
tox environment identifier
This commit is contained in:
Brian Warner 2018-03-29 11:46:12 -07:00
parent ba835b1414
commit f1a853e115

View File

@ -6,6 +6,7 @@ before_cache:
- rm -f $HOME/.cache/pip/log/debug.log - rm -f $HOME/.cache/pip/log/debug.log
git: git:
depth: 1000 depth: 1000
install: install:
# ~/.local/bin is on $PATH by default, but on OS-X, --user puts it elsewhere # ~/.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 - 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 - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then pip install --upgrade codecov tox setuptools; fi
- echo $PATH; which python; which pip; which tox - echo $PATH; which python; which pip; which tox
- python misc/build_helpers/show-tool-versions.py - python misc/build_helpers/show-tool-versions.py
script: script:
- if [ "${MODE}" = "codechecks" ]; then tox -e codechecks; fi - if [ "${T}" = "integration" ]; then /bin/bash integration/install-tor.sh; fi
- if [ "${MODE}" = "tests" ]; then tox; fi - tox -e ${T}
- if [ "${MODE}" = "coverage" ]; then tox -e coverage; fi
- if [ "${MODE}" = "integration" ]; then /bin/bash integration/install-tor.sh && tox -e integration; fi
after_success: after_success:
- if [ "${MODE}" = "coverage" ]; then codecov; fi - if [ "${T}" = "coverage" ]; then codecov; fi
notifications: notifications:
email: false email: false
irc: irc:
@ -31,17 +33,18 @@ notifications:
template: template:
- "%{repository}#%{build_number} [%{branch}: %{commit} by %{author}] %{message}" - "%{repository}#%{build_number} [%{branch}: %{commit} by %{author}] %{message}"
- "Changes: %{compare_url} | Details: %{build_url}" - "Changes: %{compare_url} | Details: %{build_url}"
matrix: matrix:
include: include:
- os: linux - os: linux
env: MODE=coverage LANG=en_US.UTF-8 env: T=coverage LANG=en_US.UTF-8
- os: linux - os: linux
env: MODE=integration LANG=en_US.UTF-8 env: T=integration LANG=en_US.UTF-8
- os: linux - os: linux
env: MODE=codechecks LANG=en_US.UTF-8 env: T=codechecks LANG=en_US.UTF-8
- os: linux - os: linux
env: MODE=tests LANG=C env: T=py27 LANG=C
- os: osx - 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 language: generic # "python" is not available on OS-X
fast_finish: true fast_finish: true