forked from tracespace/tracespace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (42 loc) · 1.24 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
sudo: false
language: node_js
node_js:
- 'lts/boron'
- 'lts/carbon'
- 'lts/dubnium'
- node
# upgrade npm if necessary
before_install: if [[ ! $(npm -v) =~ ^6 ]]; then npm i -g npm@6; fi
install: npm ci
script: npm run ci:script
after_success: npm run ci:after-success
cache:
directories:
- $HOME/.npm
# use build stages with "test" and "deploy" stages
# node_js versions above automatically added to "test" stage
jobs:
include:
# TODO(mc, 2018-04-13): add browser test to default "test" stage
# - script: npm run test:browser
# node_js: node
- stage: deploy
# deploy if tag starts with v
if: tag =~ ^v
node_js: node
script: npm run example && npm run docs
after_success: echo "skipping coverage upload"
# set npm credentials for npm publish
before_deploy:
- npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- npm config set tracespace:publishTag $(node scripts/get-npm-tag.js $TRAVIS_TAG)
deploy:
provider: script
script: npm run ci:publish
# keep node_modules for deploy
skip_cleanup: true
# deploy on tagged commits
on:
repo: tracespace/tracespace
tags: true
all_brances: true