-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
37 lines (31 loc) · 976 Bytes
/
.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
language: node_js
dist: trusty
sudo: false
cache:
yarn: true
directories:
- $HOME/.cache/yarn
- $HOME/.npm
before_cache:
- echo "{}" > /home/travis/.npm/anonymous-cli-metrics.json
addons:
apt:
sources:
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
packages:
- yarn
node_js:
- stable
- 8
- 7
- 6
- 5
- 0.12
- 0.10
install: if [[ `node -v` == v0.1* ]]; then npm install; elif [[ `node -v` > v8 ]]; then npm install; else yarn install; fi
script: if [ "$TRAVIS_NODE_VERSION" = "stable" ]; then npm run build && npm run cover; else npm test; fi
after_success:
- if [ "$TRAVIS_NODE_VERSION" = "stable" ]; then npm run cover:report:coveralls; fi
- if [ "$TRAVIS_NODE_VERSION" = "stable" ]; then npm install codeclimate-test-reporter --global; fi
- if [ "$TRAVIS_NODE_VERSION" = "stable" ]; then codeclimate-test-reporter < coverage/lcov.info; fi