Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
134 lines (113 sloc) 3.36 KB
sudo: false
language: python
python:
- 3.4.4
- 3.5
stages:
- name: sentinel
if: branch != master OR type = pull_request
- test
- moban
- name: unsupported
if: branch = master AND type = push
.disable_global: &disable_global
before_install: false
install: true
before_script: false
after_success: false
after_failure: false
.check_moban: &check_moban
<<: *disable_global
python: 3.6
stage: moban
install: pip install moban
script: .misc/check_moban.sh
if: branch != master OR type = pull_request
jobs:
include:
- stage: sentinel
# All other jobs will be cancelled if the sentinel job fails
python: 3.6
- stage: test
# The sentinel job isnt active on master pushes, so the
# job is re-added to the bottom of the test matrix
python: 3.6
if: branch = master AND type = push
# OSX build removed due to long build startup delays
# Restore matrix job entry from d2d67fab to test OSX
- python: 2.7
<<: *disable_global
stage: unsupported
script: .misc/check_unsupported.sh
- python: 3.3
<<: *disable_global
stage: unsupported
script: .misc/check_unsupported.sh
- python: 3.4.3
<<: *disable_global
stage: unsupported
script: .misc/check_unsupported.sh
- python: 3.6
stage: moban
install: pip install moban
script: .misc/check_moban.sh
if: branch = master AND type = push
- *check_moban
allow_failures:
- *check_moban
env:
global:
- PATH="$PATH:$TRAVIS_BUILD_DIR/node_modules/.bin"
- BEARS_ZIP_URL=https://codeload.github.com/coala/coala-bears/zip
cache:
pip: true
directories:
- node_modules
- docs/_build
before_install:
- if [[ $TRAVIS_OS_NAME == osx ]]; then TRAVIS_PYTHON_VERSION=3.5; fi
- >
if [[ $TRAVIS_OS_NAME == osx ]]; then
brew install python3
sudo ln -sf $(which python3) $(which python)
sudo ln -sf $(which pip3) $(which pip 2>/dev/null || echo /usr/bin/pip)
fi
# Use pip 9, so that setuptools can be downgraded.
# https://github.com/coala/coala/issues/4708
# Apart from builds with python 2.7 and 3.5, it installs setuptools
# twice. So, it is required to uninstall one version manually.
- pip uninstall setuptools --yes
- pip install pip==9 setuptools==21
- python .misc/check_setuptools.py
# https://github.com/coala/coala/issues/3183
# Travis automatically installs the `requirements.txt` in "install" stage
- cp requirements.txt requirements.orig
- cat test-requirements.txt docs-requirements.txt >> requirements.txt
- sed -i.bak '/^-r/d' requirements.txt
# OSX is not a real Travis 'python' image, so it does not install
# requirements.txt automatically.
- if [[ $TRAVIS_OS_NAME == osx ]]; then pip install -r requirements.txt; fi
# For bears in .coafile requiring npm dependencies
- npm install --no-save
before_script:
# Restore the original requirements.txt
- mv requirements.orig requirements.txt
- python .misc/check_setuptools.py
script:
- py.test
- python setup.py bdist_wheel
- pip install ./dist/coala-*.whl
- curl -fsSL -o coala-bears.zip $BEARS_ZIP_URL/master
- pip install coala-bears.zip[alldeps] --pre -U
- coala --non-interactive
- python setup.py docs
- .ci/check_man.sh
after_success:
- codecov
after_failure:
- codecov
notifications:
email: false
branches:
exclude:
- /^sils\//