-
Notifications
You must be signed in to change notification settings - Fork 75
/
.travis.yml
37 lines (30 loc) · 1.38 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
language: node_js
sudo: false
addons:
sauce_connect:
# Update SAUCE_USERNAME / SAUCE_ACCESS_KEY in travis if necessary
# https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
sauce_connect: true
cache:
directories:
- node_modules
env:
matrix:
- NODE_VER=4 FULL_VALIDATE=false
- NODE_VER=6 FULL_VALIDATE=true alias grunt=./node_modules/grunt-cli/bin/grunt
- NODE_VER=7 FULL_VALIDATE=false
matrix:
fast_finish: true
before_install:
- nvm install $NODE_VER
- npm install -g npm@4 && npm install -g npx && node -v && npm -v
- if [ "$FULL_VALIDATE" == "true" ]; then npm install [email protected] grunt-cli grunt-contrib-connect grunt-run; fi
install:
- npm install
- if [ "$FULL_VALIDATE" == "true" ]; then npm run lint && npm run check_circular_dependencies; fi
script:
- if [ "$FULL_VALIDATE" == "true" ] && [ -n "DANGER_GITHUB_API_TOKEN" ]; then echo {} > ./.babelrc && npx danger; fi
- npm run build_spec && npm run test_mocha && node ./node_modules/markdown-doctest/bin/cmd.js
after_success:
- if [ "$FULL_VALIDATE" == "true" ]; then npm run cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi
- if [ "$FULL_VALIDATE" == "true" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "$SAUCE_ACCESS_KEY" ]; then npm run build_spec_browser && grunt --gruntfile spec/support/mocha.sauce.gruntfile.js; fi