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
100
GitHub Actions is Fun
hatsu
June 27, 2024
Tweet
Share
More Decks by hatsu
See All by hatsu
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
21
8.1k
Just a Rails Patch Update
hatsu38
2
430
Dive into MaintenanceTasks
hatsu38
1
87
Other Decks in Programming
See All in Programming
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
170
gopls を改造したら開発生産性が高まった
satorunooshie
8
220
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.2k
Nuxt UI Pro、NuxtHub、Nuxt Scripts、Nuxtエコシステムをふんだんに利用して開発するコーポレートサイト@Vue Fes Japan 2024
shingangan
3
810
知られざるNaNの世界
hole
3
1.2k
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
220
推し活の ハイトラフィックに立ち向かう Railsとアーキテクチャ - Kaigi on Rails 2024
falcon8823
6
1.1k
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
210
The future of development – Are our jobs getting harder or easier?
hollycummins
1
240
hotwire_or_react
harunatsujita
6
2.5k
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
0
170
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
160
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
A Tale of Four Properties
chriscoyier
156
23k
Typedesign – Prime Four
hannesfritz
39
2.4k
Adopting Sorbet at Scale
ufuk
73
9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
RailsConf 2023
tenderlove
29
870
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
280
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
[RailsConf 2023] Rails as a piece of cake
palkan
50
4.8k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.5k
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 ָ͍͠