forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
648 lines (573 loc) · 14.8 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
sudo: false
dist: xenial
language: python
notifications:
email: false
python: 3.6.3
stages:
- name: sentinel
- test-languages
- test-other-versions
cache: &global_cache
pip: true
directories:
- $HOME/.local/
.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:
# Manually added "language" entries should complete test coverage
- stage: test-languages
dist: xenial
# This is in generic image, as language: haskell isnt working yet
# https://github.com/coala/coala-bears/issues/1384
language: generic
env: DIST=xenial BEARS=adhoc BEAR_LIST="ghc-mod"
# ghc-mod needs parts of ghc, specifically at least /usr/lib/ghc/settings
# ghc-mod needs cabal-install
cache:
pip: true
directories:
- $HOME/.local/
- $HOME/.cabal/
- $HOME/.ghc/
- $HOME/.ghc-mod/
addons:
apt:
packages:
- cabal-install
- ghc
- ghc-mod
- stage: test-languages
dist: xenial
language: generic
env: DIST=xenial BEARS=adhoc BEAR_LIST="apt_get bakalint default-jre"
DISABLE_BEARS="astyle flawfinder ghc-mod r_script shellcheck"
# astyle and shellcheck are failing in xenial
# xenial doesnt have Python 2.7 needed for flawfinder
# R bears and ghc_mod use separate jobs
addons:
apt:
packages:
- chktex
- cppcheck
- devscripts
- hlint
- indent
- libperl-critic-perl
- libxml2-utils
- mono-mcs
- php7.0-cli
- phpmd
- php-codesniffer
- verilator
- stage: test-languages
dist: trusty
language: generic
env: DIST=trusty BEARS=adhoc BEAR_LIST="astyle flawfinder shellcheck"
addons:
apt:
sources:
- sourceline: # astyle
deb http://ppa.launchpad.net/cs50/ppa/ubuntu trusty main
key_url:
https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x5BDA2E974A0E822C
packages:
- astyle
- flawfinder
- shellcheck
- stage: test-other-versions
dist: trusty
language: generic
env: DIST=trusty BEARS=apt_get
addons:
apt:
packages:
- chktex
- cppcheck
- devscripts
- indent
- libperl-critic-perl
- libxml2-utils
- mono-mcs
- php5-cli
- php-codesniffer
- verilator
# Additonal manual entries
- stage: test-other-versions
os: windows
language: bash
python: '3.6.8'
env:
BEAR_LIST="astyle cppcheck xmllint"
TOX_TEST_SELECTORS="pip-noreqs-npm-gem-go-perl-php-java8-adhoc"
cache:
directories:
- C:/nuget_http_cache/
- C:/choco_cache/
- C:/pip_cache/
before_install:
- bash --version
- powershell -c "Set-ExecutionPolicy -ExecutionPolicy Unrestricted
-Scope LocalMachine"
- powershell .ci/travis_init.ps1
- export NUGET_HTTP_CACHE_PATH=/C/nuget_http_cache
- export CHOCO_CACHE_DIR=/C/choco_cache
- export PIP_CACHE_DIR=/C/pip_cache
- source .ci/travis_extra_globals.sh
- export TOXINI_SITEPACKAGES=true
- export VIRTUALENV_NO_PIP=1
- export VIRTUALENV_NO_SETUPTOOLS=1
- export TOXENV="py36-${TOX_TEST_SELECTORS}-${TOX_FEATURES}-win"
- printenv
- cp .ci/choco.config $ChocolateyInstall/config/chocolatey.config
- python .ci/store_env_in_registry.py
- source .ci/refreshenv.sh
# TODO: Add support for disabling pre-installed vctools which is
# disabled in choco_requirements. Uninstalling vctools fails
install:
- powershell -c ". .ci/Fudge.ps1 install"
- refreshenv
- taskkill -IM "gpg-agent.exe" || true
- pip uninstall tox-venv || true
# Avoid verify_gemfile_dependencies_are_found errors due to
# Gemfile modifications in .ci/deps.ruby-packages.ps1
- cp Gemfile.win Gemfile
- cp requirements.txt requirements.orig
- cp tox.ini tox.orig
- "sed -i 's/^envlist.*$/envlist: '$TOXENV/ tox.ini"
after_script:
- cp tox.orig tox.ini
- cp Gemfile.orig Gemfile
- python: 2.7
stage: test-other-versions
env: PIP_NO_COMPILE=1
before_install: true
install: pip install 3to2
before_script: true
script: .ci/check_unsupported.sh
- python: 3.3
stage: test-other-versions
dist: trusty
env: PIP_NO_COMPILE=1
before_install: true
install: true
before_script: true
script: .ci/check_unsupported.sh
- python: 3.6
stage: sentinel
before_install: false
install: pip install moban
before_script: false
script: .ci/check_moban.sh
after_success: false
after_failure: false
# Entries generates from `supported_versions`
- stage: sentinel
dist: trusty
language: python
python: 3.6
addons:
apt:
packages: clang-3.4
cache:
<<: *global_cache
directories:
- $HOME/.local/
- docs/_build/
- $HOME/nltk_data/
- stage: test-languages
dist: trusty
language: python
python: 3.5
addons:
apt:
packages: clang-3.4
cache:
<<: *global_cache
directories:
- $HOME/.local/
- docs/_build/
- $HOME/nltk_data/
- stage: test-other-versions
dist: trusty
language: python
python: 3.4.4
addons:
apt:
packages: clang-3.4
cache:
<<: *global_cache
directories:
- $HOME/.local/
- docs/_build/
- $HOME/nltk_data/
- stage: test-languages
dist: precise
language: generic
env:
DIST="precise"
BEARS="apt_get"
addons:
apt:
packages:
- chktex
- cppcheck
- default-jre
- devscripts
- flawfinder
- indent
- libperl-critic-perl
- libxml2-utils
- mono-mcs
- perl
- php5-cli
- ruby
- verilator
- python
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/.pyenv/
- stage: test-other-versions
dist: bionic
language: generic
env:
DIST="bionic"
BEARS="apt_get"
DISABLE_BEARS="shellcheck"
- stage: test-languages
language: csharp
mono: 5.20.1
- stage: test-languages
language: r
r: release
cache:
<<: *global_cache
packages: true
- stage: test-other-versions
language: r
r: devel
cache:
<<: *global_cache
packages: true
- stage: test-other-versions
language: r
r: oldrel
cache:
<<: *global_cache
packages: true
- stage: test-languages
language: node_js
node_js: '10'
cache:
<<: *global_cache
npm: true
- stage: test-other-versions
language: node_js
node_js: 9
cache:
<<: *global_cache
npm: true
- stage: test-other-versions
language: node_js
node_js: 8
cache:
<<: *global_cache
npm: true
- stage: test-other-versions
language: node_js
node_js: 7
cache:
<<: *global_cache
npm: true
- stage: test-other-versions
language: node_js
node_js: 6
cache:
<<: *global_cache
npm: true
- stage: test-languages
language: julia
julia: 1.1
env: JL_PKG=CoalaBears
install:
- julia --color=yes .ci/deps.julia.jl
# Verify compilation works
- julia -e 'import Lint.lintfile'
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/.julia/
- stage: test-other-versions
language: julia
julia: 1.0
env: JL_PKG=CoalaBears
install:
- julia --color=yes .ci/deps.julia.jl
# Verify compilation works
- julia -e 'import Lint.lintfile'
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/.julia/
- stage: test-other-versions
language: julia
julia: 0.7.0
env: JL_PKG=CoalaBears
install:
- julia --color=yes .ci/deps.julia.jl
# Verify compilation works
- julia -e 'import Lint.lintfile'
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/.julia/
- stage: test-languages
language: dart
dart: 1.15.0
- stage: test-other-versions
language: dart
dart: 1.14.2
- stage: test-languages
dist: trusty
language: perl
perl: '5.30'
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/perl5/
- stage: test-other-versions
dist: trusty
language: perl
perl: 5.22
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/perl5/
- stage: test-other-versions
dist: trusty
language: perl
perl: 5.18
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/perl5/
- stage: test-other-versions
dist: trusty
language: perl
perl: 5.14
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/perl5/
- stage: test-languages
language: go
go: 1.11
install: skip
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/.cache/go-build/
- $HOME/gopath/pkg/mod/
- stage: test-other-versions
language: go
go: '1.10'
install: skip
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/.cache/go-build/
- $HOME/gopath/pkg/mod/
- stage: test-languages
dist: trusty
language: ruby
rvm: 2.4
cache:
<<: *global_cache
bundler: true
- stage: test-other-versions
dist: trusty
language: ruby
rvm: 2.3
cache:
<<: *global_cache
bundler: true
- stage: test-other-versions
dist: trusty
language: ruby
rvm: 2.2
cache:
<<: *global_cache
bundler: true
- stage: test-other-versions
dist: trusty
language: ruby
rvm: 2.1
cache:
<<: *global_cache
bundler: true
- stage: test-other-versions
dist: trusty
language: ruby
rvm: 2.5
env: DISABLE_BEARS="csvlint"
cache:
<<: *global_cache
bundler: true
- stage: test-languages
dist: trusty
language: php
php: 7.2
- stage: test-other-versions
dist: trusty
language: php
php: hhvm-3.18
- stage: test-other-versions
dist: trusty
language: php
php: 5.5
- stage: test-languages
language: scala
scala: 2.11
- stage: test-other-versions
language: scala
scala: 2.12.2
jdk: openjdk8
- stage: test-languages
language: java
jdk: openjdk8
- stage: test-other-versions
dist: trusty
language: java
jdk: openjdk7
env: DISABLE_BEARS="tailor"
- stage: test-other-versions
language: java
jdk: openjdk11
env: DISABLE_BEARS="languagetool tailor"
- stage: test-languages
language: lua
env: BEARS="lua"
addons:
apt:
packages: luarocks
cache:
<<: *global_cache
directories:
- $HOME/.local/
- $HOME/.luarocks/
- stage: test-languages
dist: trusty
language: generic
env:
BEARS="opam"
INFER_VERSION="0.7.0"
PATH="$PATH:$HOME/infer-linux64-v$INFER_VERSION/infer/bin"
addons:
apt:
sources:
- avsm
packages:
- camlp4-extra
- ocaml
- opam
- *moban
allow_failures:
- *moban
stage: test
env:
global:
- TERM=dumb
- PATH="$HOME/.local/bin:$PATH"
# These are only needed by Windows
- NUGET_EXE_NO_PROMPT=true
- VIRTUALENV_NO_DOWNLOAD=1
# Enable to debug tox
# VIRTUALENV_VERBOSE=1
# This exceeds the travis maximum log length
# PIP_VERBOSE=1
- PIP_DISABLE_PIP_VERSION_CHECK=1
- PIP_YES=1
- FudgeCI=${TRAVIS_BUILD_DIR}/.ci/
- TOX_FEATURES="check-noskip-codecov"
before_install:
- printenv
- mkdir -p ~/bin ~/.local/bin
- source .ci/travis_extra_globals.sh
- if [ -z "$TRAVIS_PYTHON_VERSION" ]; then
.ci/deps.python36.sh;
fi
- if [ -d "$HOME/.pyenv/bin" ]; then
export PATH="$HOME/.pyenv/bin:$PATH";
fi
- hash -r && pyenv versions --bare && python --version
- if [ "${TRAVIS_PYTHON_VERSION/3.4/}" != "$TRAVIS_PYTHON_VERSION" ]; then
pip install pip==9.0.3 setuptools==21.2.2;
fi
- if [ -f ".ci/deps.$TRAVIS_LANGUAGE.sh" ]; then
bash -e -x ".ci/deps.$TRAVIS_LANGUAGE.sh";
fi
# https://github.com/coala/coala/issues/3183
- cp requirements.txt requirements.orig
- printf '%s\n%s\n%s\n'
"$(cat test-requirements.txt)"
"$(grep -v '^-r' docs-requirements.txt)"
"$(cat bear-requirements.txt requirements.txt)"
> requirements.txt
before_script:
- mv requirements.orig requirements.txt
- if [ -n "$TRAVIS_PYTHON_VERSION" ]; then
python setup.py bdist_wheel &&
pip install $(ls ./dist/*.whl)"[alldeps]";
fi
- if [ -z "$TRAVIS_PYTHON_VERSION" -a "$TRAVIS_OS_NAME" = "linux" ]; then
python -m pip install --upgrade --user -r test-requirements.txt;
fi
- if [ "${TRAVIS_PYTHON_VERSION/3.4/}" != "$TRAVIS_PYTHON_VERSION" ]; then
pip install --upgrade setuptools;
fi
script:
# Ensure metadata files are in sync with the bear metadata in the source
- if [ -n "$TRAVIS_PYTHON_VERSION" ]; then
PYTHONPATH=. .ci/generate_bear_metadata.py --debug --update;
fi
- python -m tox
- if [ -n "$TRAVIS_PYTHON_VERSION" ]; then
python setup.py docs;
fi
- if [ -n "$TRAVIS_PYTHON_VERSION" ]; then
coala --non-interactive;
fi
branches:
exclude:
- /^sils\//