Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI 環境を構築する課題を作成 #40

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Documentation/CI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# CI

> 継続的インテグレーション (CI) とは、ソフトウェアの開発においてコードを頻繁に共有リポジトリにコミットする手法のことです。 コードをコミットする頻度が高いほどエラーの検出が早くなり、開発者がエラーの原因を見つけるためにデバッグしなければならないコードの量も減ります。

https://docs.github.com/ja/actions/automating-builds-and-tests/about-continuous-integration

CI の導入により、研修中にビルドができなくなったり、テストが失敗するようになったことを自動検知し、自身とレビュワーの負荷を減らすことができます。

GitHub には GitHub Actions という仕組みで CI を導入できるようになっています。

https://docs.github.com/ja/actions/learn-github-actions/understanding-github-actions

さらに CI を自分の PC 環境で動かすことも可能です。これにより、研修の CI 環境を業務の CI 環境と切り離すことができるので安心して試せます。

https://docs.github.com/ja/actions/hosting-your-own-runners/about-self-hosted-runners

# 課題
GitHub Actions のセルフホステッドランナーを利用して PR が更新されたらビルドとテストを実行する CI 環境を構築してみよう

## 参考
- [GitHub Actions でセルフホステッドランナーを使う](https://zenn.dev/yumemi_inc/articles/github-actions-hosted-runner)
- [GitHub Actions で XCTest を実行する](https://zenn.dev/yumemi_inc/articles/xctest-github-actions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今ってyumemi orgに入れてるんですっけ
publicにしてyumemi-inc or 個人にいれるとレビュワーの問題があるが
actionsでレビュワーの自動アサインはできたので、auto_request_review.ymlの設定さえ用意しちゃえばpublic運用にしちゃってもよいかも
https://github.com/marketplace/actions/auto-request-review

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yumemi org で private で実施し、終了後に public -> 個人のアカウントに transfer となっています。

この後、個人で private にして、 CI を回してしまって課金事故に繋がるケースもあり得そうなので、課金に関する注意事項も追記した方が良さそうですね。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub Actions のセルフホステッドランナーを利用した場合、課金事故は防げますが、
今度は、 private -> public にした場合、セキュリティホールになるリスクがあります。

いずれにせよ、 GitHub Actions を利用してもらうなら、そういった観点の理解も必要になり、それをこの研修の目的にすべきなのか検討する必要があります。

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Session1がレビュー待ちの場合...
1. `session/1`のマージ後、`session/2`を`main`でrebaseする

# Session
0. [CI](Documentation/CI.md)
1. [AutoLayout](Documentation/AutoLayout.md)
1. [API](Documentation/API.md)
1. [Lifecycle](Documentation/VC_Lifecycle.md)
Expand Down