Skip to content

Commit dbc6efd

Browse files
committed
.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
1 parent 43f6ed0 commit dbc6efd

File tree

4 files changed

+49
-39
lines changed

4 files changed

+49
-39
lines changed

.misc/check_moban.sh

-15
This file was deleted.

.moban.yaml

+11-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@ docs_toc: false
1818
test_py36: true
1919
allow_generic_no_cover: true
2020
test_timeout: 60
21+
travis_sentinel: true
2122
python_versions:
2223
- 3.6
2324
- 3.5
2425
- 3.4.4
2526
- 3.4.2
2627
# 3.7 excluded due to https://github.com/coala/coala/issues/6028 and others
28+
test_unsupported_python_versions:
29+
- 2.7
30+
- 3.3
31+
- 3.4.1
2732

2833
entry_points:
2934
console_scripts:
@@ -44,15 +49,18 @@ dependencies:
4449
- Pygments~=2.1
4550
- PyPrint~=0.2.6
4651
- requests~=2.12
47-
- setuptools>=21.0.0
52+
- setuptools>=21.2.2
4853
- unidiff~=0.5.2
4954

5055
gitignore_extra_rulesets:
5156
- node
5257

5358
requires:
54-
- https://gitlab.com/coala/mobans.git
59+
- type: git
60+
url: https://gitlab.com/jayvdb/mobans
61+
branch: custom-travis-template
5562
- https://github.com/NAStools/homeassistant.git
63+
5664
configuration:
5765
template_dir:
5866
- .moban.dt/
@@ -82,11 +90,11 @@ targets:
8290
- coalib/VERSION: VERSION.jj2
8391
- runtime.txt: runtime.txt
8492
- netlify.toml: docs/netlify.toml
93+
- .travis.yml: ci/coala-travis.yml.jj2
8594
- .misc/appveyor.yml: ci/appveyor.yml.jj2
8695
- .misc/run_with_env.cmd: run_with_env.cmd
8796
- .misc/check_unsupported.sh: ci/check_unsupported.sh.jj2
8897
copy:
89-
- .misc/check_moban.sh: ci/check_moban.sh
9098
- .misc/check_setuptools.py: ci/check_setuptools.py
9199
# homeassistant license MIT
92100
- coalib/misc/Asyncio.py: async.py

.travis.yml

+37-20
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
sudo: false
2+
dist: xenial
23
language: python
4+
notifications:
5+
email: false
36
python:
4-
- 3.4.4
57
- 3.5
6-
- 3.4.2
8+
- 3.4
79

810
stages:
911
- name: sentinel
@@ -14,19 +16,27 @@ stages:
1416
if: branch = master AND type = push
1517

1618
.disable_global: &disable_global
19+
addons: false
20+
cache: false
21+
env: {}
22+
python: false
1723
before_install: false
18-
install: true
24+
install: false
1925
before_script: false
26+
script: false
2027
after_success: false
2128
after_failure: false
29+
before_deploy: false
30+
deploy: false
2231

23-
.check_moban: &check_moban
32+
.moban: &moban
2433
<<: *disable_global
2534
python: 3.6
2635
stage: moban
27-
install: pip install moban
28-
script: .misc/check_moban.sh
29-
if: branch != master OR type = pull_request
36+
install: pip install moban>=0.0.4
37+
script:
38+
- moban
39+
- git diff --exit-code
3040

3141
jobs:
3242
include:
@@ -54,28 +64,32 @@ jobs:
5464
<<: *disable_global
5565
stage: unsupported
5666
script: .misc/check_unsupported.sh
57-
- python: 3.6
58-
stage: moban
59-
install: pip install moban
60-
script: .misc/check_moban.sh
67+
- stage: moban
68+
<<: *moban
6169
if: branch = master AND type = push
62-
- *check_moban
70+
- *moban
6371
allow_failures:
64-
- *check_moban
72+
- *moban
73+
74+
stage: test
6575

6676
env:
6777
global:
6878
- PATH="$PATH:$TRAVIS_BUILD_DIR/node_modules/.bin"
6979
- BEARS_ZIP_URL=https://codeload.github.com/coala/coala-bears/zip
80+
- GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/"
81+
7082

7183
cache:
7284
pip: true
7385
directories:
7486
- node_modules
7587
- docs/_build
88+
- ~/nltk_data
89+
- ~/.jabba
7690

7791
before_install:
78-
- if [[ $TRAVIS_OS_NAME == osx ]]; then TRAVIS_PYTHON_VERSION=3.5; fi
92+
- curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh
7993

8094
- >
8195
if [[ $TRAVIS_OS_NAME == osx ]]; then
@@ -84,12 +98,17 @@ before_install:
8498
sudo ln -sf $(which pip3) $(which pip 2>/dev/null || echo /usr/bin/pip)
8599
fi
86100
101+
# See rationale in .ci/deps.python-packages.ps1 for pre-installing these
102+
- pip install --prefer-binary cffi lxml
87103
# Use pip 9, so that setuptools can be downgraded.
88104
# https://github.com/coala/coala/issues/4708
89105
# Apart from builds with python 2.7 and 3.5, it installs setuptools
90106
# twice. So, it is required to uninstall one version manually.
91107
- pip uninstall setuptools --yes
92-
- pip install pip==9.0.1 setuptools==21
108+
- pip uninstall setuptools --yes || true
109+
- pip uninstall setuptools --yes || true
110+
- pip uninstall pipenv --yes || true
111+
- pip install pip==9.0.1 setuptools==21.2.2
93112
- python .misc/check_setuptools.py
94113

95114
# https://github.com/coala/coala/issues/3183
@@ -104,6 +123,7 @@ before_install:
104123

105124
# For bears in .coafile requiring npm dependencies
106125
- npm install --no-save
126+
- source ~/.install-jdk-travis.sh
107127

108128
before_script:
109129
# Restore the original requirements.txt
@@ -113,9 +133,9 @@ before_script:
113133
script:
114134
- py.test
115135
- python setup.py bdist_wheel
116-
- pip install ./dist/coala-*.whl
136+
- pip install ./dist/*.whl
117137
- curl -fsSL -o coala-bears.zip $BEARS_ZIP_URL/master
118-
- pip install coala-bears.zip[alldeps] --pre -U
138+
- pip install coala-bears.zip[alldeps]
119139
- coala --non-interactive
120140
- python setup.py docs
121141
- .ci/check_man.sh
@@ -126,9 +146,6 @@ after_success:
126146
after_failure:
127147
- codecov
128148

129-
notifications:
130-
email: false
131-
132149
branches:
133150
exclude:
134151
- /^sils\//

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ packaging>=16.8
88
Pygments~=2.1
99
PyPrint~=0.2.6
1010
requests~=2.12
11-
setuptools>=21.0.0
11+
setuptools>=21.2.2
1212
unidiff~=0.5.2

0 commit comments

Comments
 (0)