forked from sinonjs/sinon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (35 loc) · 1.54 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
language: node_js
node_js:
# https://github.com/nodejs/LTS
- "4" # ends April 2018
- "6" # ends April 2019
- "8" # ends December 2019
sudo: false
cache:
directories:
- node_modules
env:
global:
- SAUCE_USERNAME=sinonjs
- secure: "T0/TMZgx6NoqtAj8hvXUp1WGLdeqQR01EEWY/cvhJBv54dBLCvcIqEwBmG7w3shPmBMvFsvfrSgXqnoGeHm1dep7kanA1XfK4/OaDSfuBlFFVgIvwQph/lPqUBAHGItk/g+ky9OwJL2mNpTJmTNsf8/HulueDuRK9pUr/t98KxQ="
before_install:
- npm config set strict-ssl false
- npm install coveralls
# Prevent mochify -> puppeteer install script to run unnecessarily
- if [ "x$TRAVIS_NODE_VERSION" != "x8" ]; then npm config set ignore-scripts true; fi
before_script:
# Make npm run work for the script phase:
- if [ "x$TRAVIS_NODE_VERSION" != "x8" ]; then npm config set ignore-scripts false; fi
# these build targets only need to run once per build, so let's conserve a few resources
# ESLint only supports Node >=4
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run lint; fi
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run lint-markdown; fi
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run test-headless -- --allow-chrome-as-root; fi
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run test-webworker -- --allow-chrome-as-root; fi
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then npm run test-cloud; fi
script:
- npm run test-node
after_success:
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run test-coverage && cat ./coverage/lcov.info | coveralls lib; fi
git:
depth: 10