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
120
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
14k
Just a Rails Patch Update
hatsu38
2
520
Dive into MaintenanceTasks
hatsu38
1
100
Other Decks in Programming
See All in Programming
42 best practices for Symfony, a decade later
tucksaun
1
180
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
Beyond ORM
77web
3
410
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Jakarta EE meets AI
ivargrimstad
0
240
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
710
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
0
110
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
700
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Bash Introduction
62gerente
608
210k
Automating Front-end Workflow
addyosmani
1366
200k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Designing for Performance
lara
604
68k
A Tale of Four Properties
chriscoyier
157
23k
The World Runs on Bad Software
bkeepers
PRO
65
11k
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 ָ͍͠