-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
39 lines (37 loc) · 1.09 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
language: node_js
node_js:
- "0.6"
- "0.8"
- "0.10"
- "1.8"
- "2.5"
- "3.3"
- "4.9"
- "5.12"
- "6.14"
- "7.10"
- "8.11"
- "9.11"
- "10.4"
sudo: false
dist: precise
cache:
directories:
- node_modules
before_install:
# Skip updating shrinkwrap / lock
- "npm config set shrinkwrap false"
# Setup Node.js version-specific dependencies
- "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev istanbul"
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev $(grep -E '\"eslint\\S*\"' package.json | cut -d'\"' -f2)"
# Update Node.js modules
- "test ! -d node_modules || npm prune"
- "test ! -d node_modules || npm rebuild"
script:
# Run test script, depending on istanbul install
- "test ! -z $(npm -ps ls istanbul) || npm test"
- "test -z $(npm -ps ls istanbul) || npm run-script test-ci"
- "test -z $(npm -ps ls eslint ) || npm run-script lint"
after_script:
- "test -e ./coverage/lcov.info && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"