CI: Fix tests failing on Travis for Python 2.6

Because installing dependencies for `coveralls` now fails with:

    Collecting pycparser (from cffi>=1.7->cryptography>=1.3.4; python_version <= "2.7" and extra == "secure"->urllib3[secure]; python_version < "3"->coveralls)
    [...]
    pycparser requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' but the running Python is 2.6.9
pull/130/head
Adrien Vergé 6 years ago
parent e4e99f0aba
commit 479f580202

@ -9,14 +9,19 @@ python:
- 3.6 - 3.6
- nightly - nightly
install: install:
- pip install pyyaml flake8 flake8-import-order coveralls - pip install pyyaml flake8 flake8-import-order
- if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install unittest2; fi - if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install unittest2; fi
- if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then pip install coveralls; fi
- if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then pip install sphinx; fi - if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then pip install sphinx; fi
- pip install . - pip install .
script: script:
- if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then flake8 .; fi - if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then flake8 .; fi
- yamllint --strict $(git ls-files '*.yaml' '*.yml') - yamllint --strict $(git ls-files '*.yaml' '*.yml')
- coverage run --source=yamllint setup.py test - if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then
coverage run --source=yamllint setup.py test;
else
python setup.py test;
fi
- if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then - if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then
python setup.py build_sphinx; python setup.py build_sphinx;
fi fi

Loading…
Cancel
Save