-
Notifications
You must be signed in to change notification settings - Fork 76
/
.travis.yml
115 lines (98 loc) · 2.64 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
sudo: false
dist: xenial
language: python
notifications:
email: false
python:
- 3.4
- 3.5
- 3.6
- 3.7
stages:
- test
- moban
.disable_global: &disable_global
addons: false
cache: false
env: {}
python: false
before_install: false
install: false
before_script: false
script: false
after_success: false
after_failure: false
before_deploy: false
deploy: false
.moban: &moban
<<: *disable_global
python: 3.6
stage: moban
install: pip install moban>=0.0.4
script:
- moban
- git diff --exit-code
jobs:
include:
- stage: moban
<<: *moban
if: branch = master AND type = push
- *moban
allow_failures:
- *moban
stage: test
env:
global:
- BEARS_ZIP_URL=https://codeload.github.com/coala/coala-bears/zip
- GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/"
- JDK="[email protected]"
cache:
pip: true
directories:
- ~/nltk_data
- ~/.jabba
before_install:
- curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh
- >
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
# See rationale in .ci/deps.python-packages.ps1 for pre-installing these
- pip install --prefer-binary cffi lxml
# 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 uninstall setuptools --yes || true
- pip uninstall setuptools --yes || true
- pip uninstall pipenv --yes || true
- pip install pip==9.0.1 setuptools==21.2.2
# 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 >> 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
- source ~/.install-jdk-travis.sh
before_script:
# Restore the original requirements.txt
- mv requirements.orig requirements.txt
script:
- py.test
- python setup.py bdist_wheel
- pip install ./dist/*.whl
- curl -fsSL -o coala-bears.zip $BEARS_ZIP_URL/master
- pip install coala-bears.zip[alldeps]
- coala --non-interactive
after_success:
- codecov
after_failure:
- codecov
branches:
exclude:
- /^sils\//