SlideShare a Scribd company logo
1 of 27
Download to read offline
Travis-CIを試す
Gitしか触らないマンになるために
CIとは
Continuous Integration
↓
継続的インテグレーション
↓
継続的構築?
CIとは
ググってみたけど、
なんか自動化するための物
でしょ?
CIとは
ググってみたけど、
なんか自動化するための物
でしょ?
ちょっと違うんです
CIとは
XXXを作ってください(依頼)
↓
できました!(納品)
ストーリー1
CIとは
XXXを作ってください(依頼)
↓
できました!(納品)
ストーリー1
最後に完成したものを作る。
CIとは
XXXを作ってください(依頼)
↓
できました!(納品)
ストーリー1
最後に完成したものを作る。
往々にして、求めている物と
違うものが出来る。
CIとは
他の会社が作ったプログラムあるから
それ使って機能を改修して(依頼)
↓
嫌な予感・・・
ストーリー2
CIとは
他の会社が作ったプログラムあるから
それ使って機能を改修して(依頼)
↓
嫌な予感・・・
ストーリー2
変更したら、
別の所が
動かなくなってしまった。
CIとは
毎日、その時点での完成系が見れるように
すればいいんじゃ?
ソース変更したらテスト毎回すればいいん
じゃ?
不幸にならないために
CIとは
毎日、その時点での完成系が見れるように
すればいいんじゃ?
ソース変更したらテスト毎回すればいいん
じゃ?
↓
継続的にインテグレート
不幸にならないために
CIとは
継続的にインテグレート
↓
手動だとめんどくさいので
自動でやる仕組みを使おう。
(CIツールやCIサービス)
自動化はCIツールの事
CIツール
色々ありますが
CIツール
色々ありますが
• Jenkinsは無料で色々できるけど、全部面倒見ないといけないし、自由過ぎて
ルールが無いとカオスになる。
• Circle CIとかは、良しなにしてくれるけど有料。
CIツール
色々ありますが
を使ってみる。
Githubと連携できるので、
アカウントを作って適当にrepositoryを作成する。
アカウント作る
Travis CIのアカウントを作成する。
無料枠があるので心配せずに適当に作成。
アカウント作る
Travis CIトップページ右上の「Sign in
with GitHub」ボタンをクリック
連携させたいGithubアカウントを
選んで「Authorize application」を
クリック
GithubとTravisCIの連携
GithubとTravisCIの連携
ダッシュボードに連携した
Repositoryが表示されればOK
適当にテストコードを作る
準備するのが面倒だったので、
Laravel(phpのF/W)にphpunitが
入ってるので、
composerでインストールして使う。
.travis.ymlをプロジェクトのルートdirに作成する
language: php
php:
- 7.0
- 5.6
before_script:
- composer install
script: phpunit tests/Unit/ExampleTest.php
Githubにpushする
$git push origin master
CIする
TravisCIの画面に新しい表示がされて
Logの所にテストの結果が出力される。
全てのテストがOKならグリーン。
NGなら赤が表示される。
• メールやslaskで結果を通知できる。
• 今回はUnitTestしか実施してないがデプロ
イも出来る。(AWSとか)
CIを回すためにやった事
• アカウントを作る
• アカウントの連携
• YAMLファイルの作成
これだけ
欠点
• お金払わないとビルド内容が公開されちゃう。
• Githubしか使えない
まだCIをしていないのなら
設定ファイルだけで実施できるので、楽。
色んな言語も対応してるしいいかもしれない。
やっぱりオンプレが良い時は
• Jenkins
• Jet Brains のTeamCity
のどっちかを使うといいかも
Travis-CIを試す
Gitしか触らないマンになるために
完了

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Ciを試してみる