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 is Fun
Search
hatsu
June 27, 2024
Programming
1
110
GitHub Actions is Fun
hatsu
June 27, 2024
Tweet
Share
More Decks by hatsu
See All by hatsu
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
13k
Just a Rails Patch Update
hatsu38
2
480
Dive into MaintenanceTasks
hatsu38
1
92
Other Decks in Programming
See All in Programming
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
ヤプリ新卒SREの オンボーディング
masaki12
0
130
subpath importsで始めるモック生活
10tera
0
310
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
イベント駆動で成長して委員会
happymana
1
330
CSC509 Lecture 11
javiergs
PRO
0
180
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
240
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
169
14k
Bash Introduction
62gerente
608
210k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Why Our Code Smells
bkeepers
PRO
334
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Producing Creativity
orderedlist
PRO
341
39k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Code Review Best Practice
trishagee
64
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Designing for humans not robots
tammielis
250
25k
Transcript
GitHub Actions is Fun ʹͳ͍ͬͯͬͨ 2024/06/28 Shinjuku.rb#93 ͖ͳͷհLTେձ @hatsu_38
ࣗݾհ • ͭ͞Μ(@hatsu_38) • Ruby 5 • GitHub Actionsָ͍͠ •
SHE Inc. • ອը📚
ٕज़ελοΫ • API,GraphQLαʔόʔ: Ruby on Rails - RSpec • AdminͷUI(/adminϑΥϧμ):
TypeScript/Next.js - RSpec(Capybara)ͱJest • Ϣʔβʔը໘ͷUI(/frontend-nextϑΥϧμ): TypeScript/Next.js - RSpec(Capybara)ͱ Jest • CI: GitHub Actions
Flaky Test ͳ͍ͨ͘͠Μ͚ͩͲ…
CI্Ͱ͔͠ൃੜ͠ͳ͍Flakyͱૺ۰
Artifactsʹ͋Δ Fail࣌ͷεΫγϣΛDLͯ֬͠ೝ
εΫγϣݟͯΘ͔ΒΜ🤯
ͦͦ֬ೝ͕໘😵💫 Artifactsʹ͋Δ Fail࣌ͷεΫγϣΛDLͯ֬͠ೝ…
͔ͯCI͍🥱
GitHub ActionsΖ͏
Allure Report • ςετ݁ՌΛྑ͍ײ͡ʹϨϙʔτ͢Δͭ • ςετͷ • ΧόϨοδ • ςετ࣌ؒ
• ςετ݁Ռཤྺ • εΫγϣͱ͔ඥ͚ΒΕΔ
Allure Report • bundle exec rspec —format AllureRspecFormatter • ςετͷใΛjsonʹग़ྗ
• allure generate allure_results/* -o tmp/allure_report • ςετ݁ՌΛHTMLʹม • ϓϧϦΫΤετຖʹςετ݁ՌͷHTMLΛVercelʹσϓϩΠ • ςετࣦഊ࣌ʹVercelͷURLΛBot͕ίϝϯτͰڭ͑ͯ͘ΕΔ
PRຖʹςετ݁ՌΛVercelʹσϓϩΠ
ςετࣦഊ࣌ʹVercelͷURLΛBot͕ίϝϯτ
ͦͦ֬ೝ͕໘😵💫 Artifactsʹ͋Δ Fail࣌ͷεΫγϣΛDLͯ֬͠ೝ
Bot͕ڭ͑ͯ͘ΕΔURLΛ֬ೝ✨
εΫγϣݟͯΘ͔ΒΜ🤯
capybara-playwright-driver • playwrightͱ͍͏ςετϑϨʔϜϫʔΫΛcapybara͔Β͑Δ • εΫγϣ͚ͩ͡Όͳ͘ςετ࣌ͷಈը͕ݟΒΕΔ • ։ൃऀπʔϧʹࡌͬͯΔΑ͏ͳωοτϫʔΫͱ͔ݟΒΕΔ • Allure Report্ͰݟΒΕΔ
rails 7.1 support playwright driver
ಈը͕ݟΒΕΔ
ωοτϫʔΫτϨʔε͕ݟΒΕΔ
εΫγϣݟͯΘ͔ΒΜ🤯
ಈըͱωοτϫʔΫτϨʔε Λݟͯղܾ✨
None
next build͕͍ • Ϣʔβʔը໘: next buildʹ10 → e2eςετ10(20ฒྻ) • Adminը໘:
next buildʹ5 → e2eςετ5(15ฒྻ)
next build࣌ؒΛݮΒͦ͏
next buildʹ Ωϟογϡ͕ΘΕ͍ͯͳ͍
next buildʹΩϟογϡ͕ΘΕ͍ͯͳ͍ • .next/cacheΛGitHub ActionsͷΩϟογϡʹอଘͯ͠Build࣌ʹར༻ • APIͷมߋͷΈͰϑϩϯτʹมߋͳ͍߹ɺBuild͠ͳ͍͍ͯ͘ • buildͰੜ͞ΕΔ.next/ΛCache͔ΒRestoreͯ͠࠶ར༻
݁Ռ #VJME࣌ؒ -JLFT "ENJO ZBSOMPDLʹมߋ͋Δ߹ NT N ZBSOMPDLʹมߋͳ͠ ϑϩϯτʹมߋ͋Γ NT
NT มߋແ͠ T T
#VJME࣌ؒ -JLFT "ENJO ZBSOMPDLʹมߋ͋Δ߹ NT N ZBSOMPDLʹมߋͳ͠ ϑϩϯτʹมߋ͋Γ NT NT
มߋແ͠ T T ݁Ռ 1/2 1/18 1/2 1/17
None
Ωϟογϡར༻ͯ࣌ؒ͠Λ1/2ʹ✨
GitHub Actions ָ͍͠