forked from wechaty/wechaty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (65 loc) · 1.51 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
language: node_js
node_js:
- "10"
- "12"
- "13"
os:
- linux
- osx
- windows
addons:
apt:
packages:
- jq
- shellcheck
- moreutils
cache:
directories:
- node_modules
stages:
- test
- pack
- name: deploy
if: (type = push) AND branch =~ ^(master|v\d+\.\d+)$
install:
- npm install
script:
- node --version
- npm --version
- echo "Testing Started ..."
- if [ "$TRAVIS_OS_NAME" != 'linux' ]; then npm run test:unit; else npm run test; fi
- echo "Testing Finished"
jobs:
include:
- stage: pack
script:
- echo "NPM Pack Testing Started ..."
- npm version
- ./scripts/generate-version.sh
- npm run test:pack
- echo "NPM Pack Testing Finished."
- stage: deploy
script:
- echo "NPM Deploying Started ..."
- npm version
- ./scripts/generate-version.sh
- ./scripts/package-publish-config-tag.sh
- npm run dist
- echo "NPM Building Finished."
deploy:
provider: npm
email: zixia@zixia.net
api_key: "$NPM_TOKEN"
skip_cleanup: true
on:
all_branches: true
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/41a19fbf1d54a04e5217
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
email:
on_success: change
on_failure: change