Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GitHub Actions Parallel Testing
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yasuhiroki
October 16, 2019
Technology
1
1.3k
GitHub Actions Parallel Testing
2019/10/16 GitHub Actions Meetup Tokyo β の発表資料です
Yasuhiroki
October 16, 2019
Tweet
Share
More Decks by Yasuhiroki
See All by Yasuhiroki
自分に勉強させるには
yasuhiroki
1
440
Android Studio `Command+Shift+A`
yasuhiroki
0
380
シェルスクリプトをサーバーレスで cron したい
yasuhiroki
1
880
rails new コマンド
yasuhiroki
1
820
自動化を習慣化する
yasuhiroki
2
15k
circleci.vim
yasuhiroki
0
1.7k
ベンチャー企業がCircleCIを選んだ理由と活用方法
yasuhiroki
1
840
Rubyの正規表現を調べてみた
yasuhiroki
0
950
開発者(個人)のためのJenkins 運用編
yasuhiroki
0
2.3k
Other Decks in Technology
See All in Technology
Kubernetes環境周りの責任範囲をいい機会なので考える / Taking the Opportunity to Clarify Kubernetes Responsibilities
kohbis
1
100
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
1
660
今、求められるデータエンジニア
waiwai2111
2
1k
量子クラウドシステムと運用
oqtopus
0
180
AWSが推進するAI駆動開発ライフサイクル入門 〜 AI駆動開発時代に必要な人材とは 〜/ introduction_to_aidlc_and_skills
fatsushi
7
3.3k
pool.ntp.orgに ⾃宅サーバーで 参加してみたら...
tanyorg
1
3k
Open Table Formatにおけるストレージ抽象化の比較
lycorptech_jp
PRO
1
180
22nd ACRi Webinar - ChipTip Technology Eric-san's slide
nao_sumikawa
0
130
新規事業開発でのAWS活用
amixedcolor
1
180
Claude Code で画面の仕様書を作ろう
zozotech
PRO
0
310
xDS を活用したサービスディスカバリーで実現するブランチ別 QA 環境の構築手法
knwoop
1
160
「技術的にできません」を越えて価値を生み出せ──研究開発チームをPMが率いて生み出した価値創出
hiro93n
1
150
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.1k
How to Ace a Technical Interview
jacobian
281
24k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Git: the NoSQL Database
bkeepers
PRO
432
66k
HDC tutorial
michielstock
1
430
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
270
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Utilizing Notion as your number one productivity tool
mfonobong
3
230
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
Color Theory Basics | Prateek | Gurzu
gurzu
0
210
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Believing is Seeing
oripsolob
1
65
Transcript
GitHub Actions Parallel Testing GitHub Actions Meetup Tokyo β A10
Lab Inc. yasuhiroki
⾃自⼰己紹介
Twitter
⾃自⼰己紹介 • A10 Lab Inc. • 元Jenkinsおじさん • 現CircleCIおじさん •
CircleCI User Community Leader
本発表の概要 • GitHub Actions で並列列テスト試してみた • 内容は個⼈人的 Tipsがメイン • 私も含め皆さんの間で情報交換するきっか
けになると嬉しい
本題
やりたいこと 複数のテストを 分割して並列列して実⾏行行したい
matrix を使えばできる • https://github.com/yasuhiroki/parallel-test- github-actions-sample/tree/ b7e78a7c731a6b0590a636ed738eddfe5b3 0f65e/.github/workflows/rspec-parallels-3- node.yml#L8
テスト時間を調整したい 6min 2min 4min 4min 4min 4min job 1 job
2 job 3 job 1 job 2 job 3
CircleCIの例例 • circleci tests split --split-by=timings は CircleCI 上で記録されたファイルごとのテスト実⾏行行 時間を元に振り分けてくれる
container 0 container 1 UFTU@@TQFDSC UFTU@@TQFDSC UFTU@@TQFDSC 過去の記録から振り分ける
knapsack • https://github.com/ArturT/knapsack • ファイルごとのテスト実⾏行行時間を JSON に出 ⼒力力してくれる • その
JSON と並列列数から良い感じに割り振っ てくれる • クラウド版もあるらしい?
knapsack の使⽤用例例 • テスト実⾏行行時間 JSON • https://github.com/yasuhiroki/parallel-test-github-actions- sample/tree/b7e78a7c731a6b0590a636ed738eddfe5b30f65e/ knapsack_rspec_report.json •
Workflow 例例 • https://github.com/yasuhiroki/parallel-test-github-actions- sample/tree/ b7e78a7c731a6b0590a636ed738eddfe5b30f65e/.github/ workflows/rspec-parallels-knapsack.yml#L21
テスト結果を集計したい
• artifact を使う テスト結果を集計したい uses: actions/upload-artifact@master with: name: reports path:
reports reports
• artifact を使う テスト結果を集計したい uses: actions/download-artifact@master with: name: reports reports
毎回 install するのやめたい • キャッシュ機能がリリースされるのを待とう
毎回 install するのやめたい • 同じ Workflow 内なら artifact が使えるかも? •
upload が遅くて逆効果だった • https://github.com/yasuhiroki/enjoy- github-actions/commit/ 9e8e9de9c6898f1fc9f491fe11e75e87a4b 5d0cb/checks?check_suite_id=266056589
リポジトリURL • https://github.com/yasuhiroki/enjoy-github- actions • https://github.com/yasuhiroki/parallel-test- github-actions-sample
Tips集紹介
actions/github-script • JavaScriptを直接 YAML に書けちゃう •
GitHub token 取得⽅方法 • 実は2パターン書き⽅方がある • secrets.GITHUB_TOKEN • github.token •
commit_comment is not a valid event name • 急に is
not a valid って⾔言われるようになった
ご清聴ありがとうございました