Skip to content

Travis CIと連携できるようにした#48

Merged
anqooqie merged 1 commit intomasterfrom
test_from_command_line
Oct 24, 2015
Merged

Travis CIと連携できるようにした#48
anqooqie merged 1 commit intomasterfrom
test_from_command_line

Conversation

@anqooqie
Copy link
Copy Markdown
Contributor

todo

  • テストをコマンドラインから実行可能にする
  • Travis CI上でテストを通す

このプルリクの目的

GitHubとTravis CIを連携させます。
Travis CIを使うと、プルリクエストが行われるとテストが自動的に行われるようになります。

Travis CIを使うためには、テストをコマンドラインから実行できるようにする必要があります。
そのため、テストをコマンドラインからも実行できるようにしました。(ブラウザからのテストは従来通り #46 の方法で可能です)

コマンドラインからテストを実行する方法(Mac OS X)

brew install node
npm update -g
git clone git@github.com:enpitut/WakeUp.git
cd WakeUp/chrome_extension
npm install
npm test

Travis CIによって自動で行われたテストの結果を確認する方法

プルリクエストページのMerge pull requestボタンから二つ上の欄にテストの結果が表示されています。
例えばこのページでは、「All checks have passed」というメッセージが表示されています。

参考にしたページ

@anqooqie anqooqie self-assigned this Oct 14, 2015
@anqooqie anqooqie force-pushed the test_from_command_line branch from 11d9a4d to 8996f41 Compare October 14, 2015 07:40
@ug23
Copy link
Copy Markdown

ug23 commented Oct 14, 2015

Travis CI いいね!
LGTM

@anqooqie anqooqie force-pushed the test_from_command_line branch 2 times, most recently from b28932d to de2626f Compare October 14, 2015 08:33
@anqooqie
Copy link
Copy Markdown
Contributor Author

Travis CIのChrome(正確にはChromium)のバージョンが古過ぎてECMAScript 2015で書かれたコードが動かない…

@anqooqie anqooqie changed the title テストをコマンドラインから実行可能にした [WIP]テストをコマンドラインから実行可能にした Oct 14, 2015
@shuyuhey
Copy link
Copy Markdown

ちょっと無理矢理だけどもコレを使うとなんとかなるかも?
http://blog.h13i32maru.jp/entry/2014/12/29/163209

@kentya6
Copy link
Copy Markdown

kentya6 commented Oct 14, 2015

公式サポートされてなければパッチ当てるとかですかねー
https://www.drupal.org/node/2537902

@shuyuhey
Copy link
Copy Markdown

ES6 -> ES5 に変換して何とかする事例その2
http://qiita.com/mohayonao/items/9b0655b8b4979bffda31

@anqooqie anqooqie force-pushed the test_from_command_line branch 2 times, most recently from 315a4ce to 08f33fe Compare October 14, 2015 09:36
@shuyuhey
Copy link
Copy Markdown

もう一つの選択肢として別のCIツールの紹介です。
https://app.wercker.com/

これは、Boxという形でVMの環境構築を自由にカスタマイズできます。
chromeの例はここにあります。
https://github.com/MiCHiLU/box-dart-chrome-app
自分で定義しなくても、この人が作ったboxで十分ならこのまま使えます。
(ただ、この人はかなり自分のアプリに寄せてBOXを作ってるっぽいので、そのまま使えないかも……。)

@anqooqie anqooqie force-pushed the test_from_command_line branch 3 times, most recently from d505a0f to 92048c5 Compare October 14, 2015 09:48
@shuyuhey
Copy link
Copy Markdown

LGTM

@kentya6
Copy link
Copy Markdown

kentya6 commented Oct 14, 2015

LGTM

@ug23
Copy link
Copy Markdown

ug23 commented Oct 14, 2015

LGTM

@anqooqie anqooqie changed the title [WIP]テストをコマンドラインから実行可能にした Travis CIと連携できるようにした Oct 14, 2015
@anqooqie anqooqie force-pushed the test_from_command_line branch from 92048c5 to a681d5e Compare October 14, 2015 10:00
@furuya-s
Copy link
Copy Markdown

LGTM

@dulltz
Copy link
Copy Markdown
Contributor

dulltz commented Oct 17, 2015

👍

@anqooqie anqooqie force-pushed the test_from_command_line branch 2 times, most recently from 4825de8 to 4b4e82d Compare October 22, 2015 08:35
@anqooqie anqooqie changed the title Travis CIと連携できるようにした [WIP]Travis CIと連携できるようにした Oct 22, 2015
@anqooqie anqooqie force-pushed the test_from_command_line branch 2 times, most recently from 08e5563 to a68fa2e Compare October 22, 2015 09:57
@anqooqie anqooqie changed the title [WIP]Travis CIと連携できるようにした Travis CIと連携できるようにした Oct 22, 2015
@anqooqie anqooqie force-pushed the test_from_command_line branch from a68fa2e to 10142b5 Compare October 23, 2015 17:46
@chamstorage
Copy link
Copy Markdown
Contributor

LGTM

@anqooqie anqooqie force-pushed the test_from_command_line branch from 10142b5 to 184fa02 Compare October 24, 2015 10:51
anqooqie added a commit that referenced this pull request Oct 24, 2015
Travis CIと連携できるようにした
@anqooqie anqooqie merged commit 85c214b into master Oct 24, 2015
@anqooqie anqooqie deleted the test_from_command_line branch October 24, 2015 10:55
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.

7 participants