forked from coala/coala
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.travis.yml: Build on xenial using template
Implements https://gitlab.com/coala/mobans/merge_requests/135 working around the lxml dependency problem on Python 3.4. coala#6053 is only occurring in the Travis trusty environment. Upgrading to xenial bypasses that problem, but requires a few workarounds, especially replacing the Python 3.4.2 job with Python '3.4' which causes Travis to provide Python 3.4.8. Add gravis to template to switch jdk versions on Xenial. Uninstall setuptools multiple times on Xenial for the same reason it was required once on Trusty. Also remove unnecessary pipenv which causes pip to complain about incompatibilities. Bump setuptools dependency to match the version defined in mobans. .misc/check_moban.sh is no longer needed as the Travis template provides a moban job, and the latest moban handles branches. Related to coala#4708 Related to coala#6053 Related to coala/coala-bears#2940
- Loading branch information
1 parent
178aba8
commit 8004c44
Showing
4 changed files
with
49 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
sudo: false | ||
dist: xenial | ||
language: python | ||
notifications: | ||
email: false | ||
python: | ||
- 3.4.4 | ||
- 3.5 | ||
- 3.4.2 | ||
- 3.4 | ||
|
||
stages: | ||
- name: sentinel | ||
|
@@ -14,19 +16,27 @@ stages: | |
if: branch = master AND type = push | ||
|
||
.disable_global: &disable_global | ||
addons: false | ||
cache: false | ||
env: {} | ||
python: false | ||
before_install: false | ||
install: true | ||
install: false | ||
before_script: false | ||
script: false | ||
after_success: false | ||
after_failure: false | ||
before_deploy: false | ||
deploy: false | ||
|
||
.check_moban: &check_moban | ||
.moban: &moban | ||
<<: *disable_global | ||
python: 3.6 | ||
stage: moban | ||
install: pip install moban | ||
script: .misc/check_moban.sh | ||
if: branch != master OR type = pull_request | ||
install: pip install moban>=0.0.4 | ||
script: | ||
- moban | ||
- git diff --exit-code | ||
|
||
jobs: | ||
include: | ||
|
@@ -54,28 +64,32 @@ jobs: | |
<<: *disable_global | ||
stage: unsupported | ||
script: .misc/check_unsupported.sh | ||
- python: 3.6 | ||
stage: moban | ||
install: pip install moban | ||
script: .misc/check_moban.sh | ||
- stage: moban | ||
<<: *moban | ||
if: branch = master AND type = push | ||
- *check_moban | ||
- *moban | ||
allow_failures: | ||
- *check_moban | ||
- *moban | ||
|
||
stage: test | ||
|
||
env: | ||
global: | ||
- PATH="$PATH:$TRAVIS_BUILD_DIR/node_modules/.bin" | ||
- 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: | ||
- node_modules | ||
- docs/_build | ||
- ~/nltk_data | ||
- ~/.jabba | ||
|
||
before_install: | ||
- if [[ $TRAVIS_OS_NAME == osx ]]; then TRAVIS_PYTHON_VERSION=3.5; fi | ||
- curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh | ||
|
||
- > | ||
if [[ $TRAVIS_OS_NAME == osx ]]; then | ||
|
@@ -84,12 +98,17 @@ before_install: | |
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 install pip==9.0.1 setuptools==21 | ||
- 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 | ||
- python .misc/check_setuptools.py | ||
|
||
# https://github.com/coala/coala/issues/3183 | ||
|
@@ -104,6 +123,7 @@ before_install: | |
|
||
# For bears in .coafile requiring npm dependencies | ||
- npm install --no-save | ||
- source ~/.install-jdk-travis.sh | ||
|
||
before_script: | ||
# Restore the original requirements.txt | ||
|
@@ -113,9 +133,9 @@ before_script: | |
script: | ||
- py.test | ||
- python setup.py bdist_wheel | ||
- pip install ./dist/coala-*.whl | ||
- pip install ./dist/*.whl | ||
- curl -fsSL -o coala-bears.zip $BEARS_ZIP_URL/master | ||
- pip install coala-bears.zip[alldeps] --pre -U | ||
- pip install coala-bears.zip[alldeps] | ||
- coala --non-interactive | ||
- python setup.py docs | ||
- .ci/check_man.sh | ||
|
@@ -126,9 +146,6 @@ after_success: | |
after_failure: | ||
- codecov | ||
|
||
notifications: | ||
email: false | ||
|
||
branches: | ||
exclude: | ||
- /^sils\// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ packaging>=16.8 | |
Pygments~=2.1 | ||
PyPrint~=0.2.6 | ||
requests~=2.12 | ||
setuptools>=21.0.0 | ||
setuptools>=21.2.2 | ||
unidiff~=0.5.2 |