forked from mochajs/mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (82 loc) · 2.47 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
###
### .travis.yml
###
# these are executed in order. each must pass for the next to be run
stages:
- smoke # this ensures a "user" install works properly
- precache # warm up cache for default Node.js version
- lint # lint code and docs
- test # all tests
# defaults
language: node_js
node_js: '11'
addons:
apt:
packages:
- libnotify-bin
# `nvm install` happens before the cache is restored, which means
# we must install our own npm elsewhere (`~/npm`)
before_install: |
[[ ! -x ~/npm/node_modules/.bin/npm ]] && {
# caching feature creates `~/npm` for us
cd ~/npm && npm install npm
cd -
} || true
# avoids bugs around https://github.com/travis-ci/travis-ci/issues/5092
export PATH=~/npm/node_modules/.bin:$PATH
# this avoids compilation in most cases (where we don't need it)
install: npm ci --ignore-scripts
cache:
directories:
- ~/.npm # cache npm's cache
- ~/npm # cache latest npm
jobs:
include:
- script: COVERAGE=1 npm start test.node
after_success: npm start coveralls
- &node
script: npm start test.node
node_js: '10'
- <<: *node
node_js: '8'
- <<: *node
node_js: '6'
- script: npm start test.bundle test.browser
install: npm ci # we need the native modules here
addons:
artifacts:
paths:
- .karma/
- ./mocha.js
chrome: stable
sauce_connect: true
- stage: lint
script: npm start lint
# smoke tests use default npm.
- &smoke
stage: smoke
env: null
before_install: true
install: npm install --production
script: ./bin/mocha --no-config --reporter spec test/sanity/sanity.spec.js
cache:
directories:
- ~/.npm
- node_modules # npm install, unlike npm ci, doesn't wipe node_modules
- <<: *smoke
node_js: '10'
- <<: *smoke
node_js: '8'
- <<: *smoke
node_js: '6'
- stage: precache
script: true
notifications:
email: false
urls:
# for gitter mochajs/mocha
- secure: fUrHenYJs+pTuLtgBRoYyrlyfVekxaIGmLWq7bhUUqBj/7p5eCkQFn13LlPht0/4WWZOiPBcdTN7tKnz3Ho7ATUJhAchvOWDUgL5gtTvOzeCHbPuCvHz/VLK6hMoPdbLA45M864NDLotfHvyh62WgQaVw9iPc80eb+umaDPrYiU=
# for gitter mochajs/contributors
- secure: rGMGYWBaZgEa9i997jJHKzjI8WxECqLi6BqsMhvstDq9EeTeXkZFVfz4r6G3Xugsk3tFwb/pDpiYo1OK36kA5arUJTCia51u4Wn+c7lHKcpef/vXztoyucvw6/jXdVm/FQz1jztYYbqdyAOWC2BV8gYvg5F8TpK05UGCe5R0bRA=
on_success: change
on_failure: always