Upgrade to Pro — share decks privately, control downloads, hide ads and more …

自動回帰テストフローとGitHub Apps

自動回帰テストフローとGitHub Apps

GitHub Appsを使って回帰テストのフローを組んだら結構良かったよというお話

893f54413c2bd9ba41d11d753aacaf2c?s=128

Yosuke Kurami

March 06, 2018
Tweet

Transcript

  1. GitHub Apps and Regression test workflow SRE-SET Automation Night #2

  2. About me w !2VSBNZ UXJUUFS(JU)VC2JJUB  w ϑϩϯτΤϯυΤϯδχΞ w "OHVMBS5ZQF4DSJQU3FBDU3FEVY'MPX5ZQF

    w ໘౗ͳ͜ͱ͕ݏ͍
 ςετʙϏϧυपΓͷ؀ڥߏஙΛ๊͑ࠐΉ͜ͱ͕ଟΊ
  3. 5PEBZ`TUIFNF (JU)VC"QQTΛ࡞ͬͨΒ ྑ͍ײ͡ͷճؼςετϑϩʔ͕Ͱ͖ͨ࿩

  4. GitHub Apps is Կ w (JU)VC"QQTͱ͸ w (JU)VCͱ࿈ܞ͢ΔΞϓϦέʔγϣϯͷܗଶ w Լهͷ྆ํͷػೳΛ༗͢Δ

    w (JU)VCͷ"1*࣮ߦʹΑΔϨϙδτϦૢ࡞ w 8FCIPPLTϨϙδτϦʹى͖ͨΠϕϯτʹ൓Ԡ
  5. GitHub Apps v.s. OAuth Apps w 0"VUI"QQTͱͷҧ͍ w 0"VUI"QQT(JU)VCͷΞΧ΢ϯτʹඥͮ͘ w

    (JU)VC"QQT(JU)VCͷϨϙδτϦʹඥͮ͘ w (JU)VC"QQT͸ɺಛఆͷΞΧ΢ϯτʹґଘ͠ͳ͍ͨΊɺ νʔϜͰ։ൃ͢ΔϨϙδτϦʹ޲͘
  6. https://developer.github.com/apps/getting-started-with-building-apps/

  7. ސ٬Զ͕ٻΊ͍ͯͨϞϊ w ϑϩϯτΤϯυ༻ͷࣗಈճؼςετ؀ڥ͕ཉ͍͠ w ը໘Λߏ੒͢ΔίϯϙʔωϯτͷεΫγϣΛอଘ w εΫγϣอଘ͸$* 1VQQFUFFSར༻ͰࣗಈԽ w ௚ۙͷεφοϓγϣοτͱɺࠓճͷεΫγϣΛൺֱ

    w ࠩ෼ΛϨϏϡʔͯ͠໰୊ͳ͚Ε͹ɺ
 ࠓճεΫγϣΛ࠷৽ͷεφοϓγϣοτͱͯ͠อଘ
  8. ճؼςετϑϩʔͷΠϝʔδ

  9. εφοϓγϣοτߋ৽ཁ݅ ࠩ෼ൃੜ࣌͸ɺࠩ෼಺༰ΛνΣοΫͯ͠෼ذ͍ͨ͠

  10. https://reg-viz.github.io/reg-suit/

  11. Step 1. AppsͷΠϯετʔϧ w ϨϙδτϦʹରͯ͠ɺ(JU)VC"QQTΛΠϯετʔϧ

  12. Step 2. Push ~ CIͰͷࠩ෼ݕ஌ w ఏڙ͞ΕΔ$-*Λ$JSDMF$*΍5SBWJT$*Ͱ࣮ߦɻ
 (JU)VC"QQT "84-BNCEB ͕ΩοΫ͞ΕΔ

  13. Step 3. νʔϜϝϯό΁௨ୡ w ֘౰DPNNJUΛؚΉ13΁ɺճؼςετͷ݁ՌΛίϝϯτ

  14. Step 4. ࠩ෼ͷ֬ೝ(=ϨϏϡʔ) w ϨϏϡΞ͸ίϝϯτͷϦϯΫ͔Β
 ৄࡉϨϙʔτΛ୧ͬͯ಺༰֬ೝ

  15. Step 5. Approve ~ Merge w ϨϏϡʔͷঝೝΛτϦΨʔʹ8FCIPPLTͰ֘౰DPNNJU εςʔλεΛਖ਼ৗ΁มߋ

  16. reg-suitͰͷAppsར༻ύλʔϯ "QQT͸"84-BNCEB "1*(BUFXBZͷΈͰ࣮૷  $*͔Βͷݺͼग़͞ΕΔ(JU)VC"1*ΛDBMM͢Δؔ਺ w 13΁ͷίϝϯτ ಠࣗDPNNJUεςʔλεͷηοτ  ϨϏϡʔঝೝ࣌ʹݺͼग़͞ΕΔ8FCIPPLT

    w ಠࣗίϛοτDPNNJUεςʔλεͷߋ৽
  17. ·ͱΊ w ճؼςετΛ(JU)VCϑϩʔ΁౷߹ͯ͠Έͨ w (JU)VC"QQTʹΑΓɺࠩ෼ݕ஌ʙϨϏϡʔͷϫʔΫ ϑϩʔΛ13্Ͱ࣮ݱͰ͖ͨ w ೳಈతͳ"1*࣮ߦडಈతͳ8FCIPPLTͷ૒ํΛ࣮૷ Ͱ͖ΔͨΊɺ৭ʑͳϫʔΫϑϩʔΛαϙʔτͰ͖ͦ͏ w

    ঺հͨ͠ϑϩʔͷৄࡉ͸ԼهͰ֬ೝՄೳͰ͢
 IUUQTHJUIVCDPNSFHWJ[SFHQVQQFUFFSEFNP
  18. Thank you ! by @Quramy