forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
143 lines (132 loc) · 3.94 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
134
135
136
137
138
139
140
141
142
143
sudo: required
language: python
python:
- 3.4
- 3.5
- 3.6.1
matrix:
include:
- python: 2.7
env: UNSUPPORTED=true
- python: 3.3
env: UNSUPPORTED=true
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- avsm # OPAM stable
- hvr-ghc # Haskell
packages:
- cabal-install-1.24
- chktex
- clang-3.4
- cppcheck
- devscripts
- flawfinder
- gfortran
- ghc
- happy
- indent
- libblas-dev
- liblapack-dev
- libperl-critic-perl
- libxml2-utils
- luarocks
- menhir
- mono-mcs
- ocaml
- opam
- php-codesniffer
- verilator
cache:
pip: true
directories:
- docs/_build
# Installed language package caches
- ~/.cabal
- ~/.ghc
- ~/.ghc-mod
- ~/R/Library
- ~/.julia
- $TRAVIS_BUILD_DIR/node_modules
- $TRAVIS_BUILD_DIR/.bundle
- $TRAVIS_BUILD_DIR/vendor
# coala managed data
- ~/nltk_data
- ~/.local/share/coala-bears
# Installed linters
- ~/infer-linux64-v0.7.0
- ~/pmd-bin-5.4.1
- ~/bakalint-0.4.0
- ~/elm-format-0.18
- ~/dart-sdk/bin
- ~/.local/tailor/
- ~/phpmd
env:
global:
- CIRCLE_NODE_INDEX=-1 # Avoid accidentially being a CircleCI worker
- USE_PPAS="marutter/rdev staticfloat/juliareleases ondrej/golang"
- R_LIB_USER=~/R/Library
- LINTR_COMMENT_BOT=false
- PATH="/opt/cabal/1.24/bin:$PATH:$TRAVIS_BUILD_DIR/node_modules/.bin:$TRAVIS_BUILD_DIR/vendor/bin:$HOME/dart-sdk/bin:$HOME/.cabal/bin:$HOME/infer-linux64-v0.7.0/infer/bin:$HOME/pmd-bin-5.4.1/bin:$HOME/bakalint-0.4.0:$HOME/elm-format-0.18:$HOME/.local/tailor/tailor-latest/bin:$HOME/phpmd"
before_install:
- nvm install 6.10.2
# Remove Ruby directive from Gemfile as this image has 2.2.5
- sed -i '/^ruby/d' Gemfile
- if [[ "$UNSUPPORTED" != true ]]; then bash .ci/deps.apt.sh; fi
- if [[ "$UNSUPPORTED" != true ]]; then bash .ci/deps.sh; fi
- if [[ "$UNSUPPORTED" != true ]]; then bash .ci/deps.cabal.sh; fi
- if [[ "$UNSUPPORTED" != true ]]; then bash .ci/deps.r.sh; fi
- if [[ "$UNSUPPORTED" != true ]]; then bash .ci/deps.opam.sh; fi
- if [[ "$UNSUPPORTED" != true ]]; then bash .ci/deps.java.sh; fi
# https://github.com/coala/coala/issues/3183
- cp requirements.txt requirements.orig
- >
cat test-requirements.txt docs-requirements.txt
bear-requirements.txt >> requirements.txt
- sed -i '/^-r/d' requirements.txt
# On unsupported versions, coala will be installed in the `script` block
# mypy-lang does not install, and 3to2 must be pre-installed
# https://bitbucket.org/spirit/guess_language/issues/18
- >
if [[ "$UNSUPPORTED" == true ]]; then
pip install 3to2
export PIP_NO_COMPILE=1
sed -i.bak '/^coala/d' requirements.txt
sed -i.bak '/^mypy-lang/d' requirements.txt bear-requirements.txt
fi
before_script:
- mv requirements.orig requirements.txt
- if [[ "$UNSUPPORTED" != true ]]; then bash .ci/deps.coala-bears.sh; fi
script:
- >
if [[ "$UNSUPPORTED" == true ]]; then
set -e
python setup.py install --no-compile | tee setup.err
grep -q 'coala supports only python 3.4 or later' setup.err
if grep -q 'Traceback (most recent call last)' setup.err; then
false
fi
fi
- if [[ "$UNSUPPORTED" == true ]]; then exit; fi
- python setup.py bdist_wheel
- pip install $(ls ./dist/*.whl)"[alldeps]"
- bash .ci/tests.sh
# Ensure bear requirements are in sync with the bear PipRequirement
- .ci/generate_bear_requirements.py
- git diff --exit-code bear-requirements.txt Gemfile package.json
# https://github.com/coala/coala-bears/issues/1037
- >
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
sed -e '/bears = GitCommitBear/d' .coafile > .coafile.new
mv .coafile.new .coafile
fi
- coala --non-interactive
- codecov
- python setup.py docs
notifications:
email: false
branches:
exclude:
- /^sils\//