-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
34 lines (34 loc) · 1.07 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
language: node_js
node_js:
- 12
cache:
directories:
- '$HOME/.npm'
jobs:
include:
- stage: testing
if: branch in (master, dev)
script: # if this is not set, it will run npm run test
- npm ci
- npm run test:unit
- npm run build
- npm run build:lib
after_success: # after test is run
- cat ./coverage/lcov.info | coveralls
- stage: release
# only release on master branch with specific commit message (generated by npm version)
if: branch = master AND commit_message =~ /^[0-9]*\.[0-9]*\.[0-9]*$/
before_deploy:
- npm run build
- npm run build:lib
deploy:
- provider: npm
email: '$NPM_EMAIL'
api_key: '$NPM_TOKEN'
skip_cleanup: true
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: dist
on:
branch: master