This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
60 lines (49 loc) · 1.4 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
# Travis CI config
# http://docs.travis-ci.com/user/languages/javascript-with-nodejs/
# https://docs.travis-ci.com/user/customizing-the-build/
# https://docs.travis-ci.com/user/migrating-from-legacy/
dist: trusty
sudo: false
language: node_js
addons:
firefox: latest
chrome: stable
matrix:
include:
# Browsers
- node_js: 8
env: KARMA=true
- node_js: 8
env: KARMA=true SAUCE=true
# Node
- node_js: 4
- node_js: 5
- node_js: 6
- node_js: 7
- node_js: 8
before_script:
# Setup a virtual display for browser testing
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
# Always make sure the code passes linting rules
- npm run lint
# Run Karma (browser tests) or Mocha (Node.js tests).
# SauceLabs is run without code coverage because it frequently hangs (not sure why).
- if [[ $KARMA && $SAUCE ]]; then
npm run build;
npm run karma;
elif [[ $KARMA ]]; then
npm run build;
npm run karma:cover;
else
npm run mocha:cover;
fi
after_success:
# concatenate all code-coverage data into a single file
- ls -R1 coverage/*/lcov.info
- cat coverage/*/lcov.info > ./coverage/lcov.info
# send code-coverage data to Codacy
- cat ./coverage/lcov.info | node_modules/.bin/codacy-coverage -p .
# send code-coverage data to Coveralls
- cat ./coverage/lcov.info | node_modules/coveralls/bin/coveralls.js