forked from APIDevTools/swagger-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
56 lines (45 loc) · 1.27 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
# Travis CI config
# http://docs.travis-ci.com/user/languages/javascript-with-nodejs/
dist: trusty
sudo: required # TEMPORARY HACK (see https://github.com/travis-ci/travis-ci/issues/8836)
language: node_js
addons:
firefox: latest
chrome: stable
matrix:
include:
# Local Browsers
- node_js: 9
env: KARMA=true KARMA_COVERAGE=true
# Sauce Labs
- node_js: 9
env: KARMA=true KARMA_SAUCE=true
# Node
- node_js: 4
- node_js: 5
- node_js: 6
- node_js: 7
- node_js: 8
- node_js: 9
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).
- if [[ $KARMA ]]; then
npm run browserify -- --test;
npm run karma;
else
npm run istanbul;
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