Skip to content

初始化 Travis-CI 相关配置#350

Merged
MarisaKirisame merged 2 commits intorustcc:masterfrom
arrowrowe:enhance/include-travis
May 4, 2016
Merged

初始化 Travis-CI 相关配置#350
MarisaKirisame merged 2 commits intorustcc:masterfrom
arrowrowe:enhance/include-travis

Conversation

@arrowrowe
Copy link
Contributor

  • 内容
    • 添加 ~/.travis.yml, 声明 Node v5 测试.
    • 添加 Travis's Build Status Badge 到 README.

arrowrowe added 2 commits May 4, 2016 21:59
Request test using Node v5.
NOTE: this requires the repo's owner to turn on the repo's CI
mannually. Please kindly go to https://travis-ci.org/.

cc @wayslog
@arrowrowe arrowrowe mentioned this pull request May 4, 2016
@arrowrowe
Copy link
Contributor Author

As you can witness, this PR fixes the failed test on branch master.

@wayslog
Copy link
Member

wayslog commented May 4, 2016

greet !
But if you can add build script to checkout if there are "ERROR" or "WARN" in the output of process of "gitbook build" command ?

@arrowrowe
Copy link
Contributor Author

@wayslog 我没有理解... 是希望通过 Travis 自动构建并发布到 现在使用的在线阅读地址 么?

@wayslog
Copy link
Member

wayslog commented May 4, 2016

@arrowrowe ,咦……还是说中文好吧……
我的意思是,利用gitbook build 命令的输出来判断结果。
如果有输出中有WARN或者ERROR都是不正常的。
不过。。。travis-ci的build script要怎么自定义呢……

@MarisaKirisame MarisaKirisame merged commit 20a8912 into rustcc:master May 4, 2016
@wayslog
Copy link
Member

wayslog commented May 4, 2016

X……沙沙你咋给合了……

@wayslog
Copy link
Member

wayslog commented May 4, 2016

@MarisaKirisame

@arrowrowe
Copy link
Contributor Author

arrowrowe commented May 4, 2016

@wayslog

  • 为什么要用 gitbook build 判定测试通过与否?
  • Travis CI 在设定 language: node_js 后, 默认的测试会安装相应环境, 并调用 npm test.
  • 如果需要额外的自定义, 可以在 ~/.travis.yml 中使用 before_install 等项, 参见 Travis 相关文档 (如 Customizing the Build).

@MarisaKirisame Marisa 好样的...

@MarisaKirisame
Copy link
Contributor

怎么了。。。?

@arrowrowe
Copy link
Contributor Author

arrowrowe commented May 4, 2016

@wayslog 如果需要确认能否成功构建, 可以直接设定测试语句为 npm test && gitbook build npm test && npm run build.

@wayslog
Copy link
Member

wayslog commented May 4, 2016

包括gitbook也会自动安装?诶?这么神奇?

@arrowrowe
Copy link
Contributor Author

arrowrowe commented May 4, 2016

@wayslog 是的. 设定 language: node_js 后, 在配置 Node 环境时, 所使用的 npm install 会安装 ~/package.json 指定的依赖, #300 中将 gitbook 写入依赖了.

命令行中还是不能直接使用 gitbook build 的, 因为没有显式地全局安装 gitbook. 但可以使用 npm run build, 因为 ~/package.json 的 scripts 项指定了 build 命令为 gitbook build, 这里会调用 npm install 所安装好了的 ~/node_modules/.bin/gitbook.

@arrowrowe arrowrowe deleted the enhance/include-travis branch May 4, 2016 14:41
@arrowrowe
Copy link
Contributor Author

arrowrowe commented May 4, 2016

@wayslog See my last build's output with GitBook's building process validated.

image
image

@MarisaKirisame MarisaKirisame added this to the v1.2.0-release milestone May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants