aboutsummaryrefslogtreecommitdiffhomepage
path: root/.travis.yml
blob: d2c1fdb863419da08203b8ac642676ed5cef6a72 (plain) (blame)
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
language: node_js

sudo: false

notifications:
  email:
  - yiminghe@gmail.com

node_js:
- 6

before_install:
- |
    if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/'
    then
      echo "Only docs were updated, stopping build process."
      exit
    fi
    npm install npm@3.x -g
    phantomjs --version
script:
- |
    if [ "$TEST_TYPE" = test ]; then
      npm test
    else
      npm run $TEST_TYPE
    fi
env:
  matrix:
  - TEST_TYPE=lint
  - TEST_TYPE=test
  - TEST_TYPE=coverage