forked from coala/coala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
133 lines (114 loc) · 3.37 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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
.check_moban: &check_moban
python: 3.6
stage: moban
before_install: false
install: pip install moban
before_script: false
script: .misc/check_moban.sh
after_success: false
after_failure: false
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
stage: unsupported
script: .misc/check_unsupported.sh
- python: 3.3
stage: unsupported
script: .misc/check_unsupported.sh
- python: 3.4.3
stage: unsupported
script: .misc/check_unsupported.sh
- python: 3.6
stage: moban
install: pip install moban
before_install: false
before_script: false
script: .misc/check_moban.sh
after_success: false
after_failure: false
if: branch = master AND type = push
- *check_moban
allow_failures:
- *check_moban
env:
global:
- PATH="$PATH:$TRAVIS_BUILD_DIR/node_modules/.bin"
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
- pip install coala-bears[alldeps] --pre -U
# https://github.com/coala/coala-bears/issues/1037
- >
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
sed -i.bak '/bears = GitCommitBear/d' .coafile
fi
- coala --non-interactive
- python setup.py docs
- .ci/check_man.sh
after_success:
- codecov
after_failure:
- codecov
notifications:
email: false
branches:
exclude:
- /^sils\//