Skip to content

Commit f32ad69

Browse files
author
huangshuwei
committed
add travis
1 parent be3618b commit f32ad69

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: node_js
2+
node_js:
3+
- "10"
4+
5+
# 缓存 node_modules 文件夹,不需要每次都下载安装全部 npm 包。
6+
cache:
7+
directories:
8+
- node_modules
9+
10+
# 只对指定的分支执行构建
11+
branches:
12+
only:
13+
- master
14+
15+
script:
16+
- npm test
17+
18+
# 配置当构建失败的时候发送通知 https://docs.travis-ci.com/user/notifications
19+
notifications:
20+
# 设置 TravisBuddy,每当 Pull Request 构建失败的时候,TravisBuddy 会收到通知
21+
# 同时会将 构建失败的日志 以评论的形式添加到 Pull Request ,方便 PR 的提交者查看错误原因。
22+
webhooks:
23+
urls:
24+
- https://www.travisbuddy.com/
25+
on_success: never # 构建成功不发送邮件。默认是 change,即默认只有上次失败这次修复的成功构建才会发送邮件
26+
on_failure: always # 构建失败总是发送邮件。默认就是 always

0 commit comments

Comments
 (0)