Save 37% off PRO during our Black Friday Sale! »

GitHub Actionsでテストの結果をわかりやすく表示する

GitHub Actionsでテストの結果をわかりやすく表示する

9bf923e39671cde83584e3e926296c13?s=128

Kishikawa Katsumi

October 18, 2021
Tweet

Transcript

  1. GitHub ActionsͰςετͷ݁ՌΛ Θ͔Γ΍͘͢දࣔ͢Δ

  2. None
  3. None
  4. None
  5. None
  6. None
  7. Xcode result bundle

  8. Xcode result bundle

  9. $ xcresulttool

  10. $ xcrun xcresulttool get --path results.xcresult --format json { "_type"

    : { "_name" : "ActionsInvocationRecord" }, "actions" : { "_type" : { "_name" : "Array" }, "_values" : [ { "_type" : { "_name" : "ActionRecord" }, "actionResult" : { "_type" : { "_name" : "ActionResult" }, "coverage" : { "_type" : { "_name" : "CodeCoverageInfo" } }, "diagnosticsRef" : { "_type" : { "_name" : "Reference" }, "id" : { "_type" : { "_name" : "String" }, "_value" : "0~vHg7If_A0mZHPjzIsvdzoL3IMfYHwL0Z3rj6u9zpzhXhMGPmKNKQ6J5lQj8MHSuoz26pval1lC8J4W8bxYO52A==" }
  11. $ xcrun xcresulttool get --path results.xcresult --format json { "_type"

    : { "_name" : "ActionsInvocationRecord" }, "actions" : { "_type" : { "_name" : "Array" }, "_values" : [ { "_type" : { "_name" : "ActionRecord" }, "actionResult" : { "_type" : { "_name" : "ActionResult" }, "coverage" : { "_type" : { "_name" : "CodeCoverageInfo" } }, "diagnosticsRef" : { "_type" : { "_name" : "Reference" }, "id" : { "_type" : { "_name" : "String" }, "_value" : "0~vHg7If_A0mZHPjzIsvdzoL3IMfYHwL0Z3rj6u9zpzhXhMGPmKNKQ6J5lQj8MHSuoz26pval1lC8J4W8bxYO52A==" }
  12. $ xcrun xcresulttool get --path results.xcresult --format json \ --id

    "0~0I_MUIRIScR7EhYb3xNOgrrrCppe_B9k1ewbNE0HZs4qyaVJRD1xjS3UbUY272hciPa1kSxSDXXsRUODkYY2Uw==" { "_type" : { "_name" : "ActionsInvocationMetadata" }, "creatingWorkspaceFilePath" : { "_type" : { "_name" : "String" }, "_value" : "\/Users\/katsumi\/Develop\/Weather\/Weather.xcodeproj" },
  13. $ xcrun xcresulttool get --path results.xcresult --format json \ --id

    "0~0I_MUIRIScR7EhYb3xNOgrrrCppe_B9k1ewbNE0HZs4qyaVJRD1xjS3UbUY272hciPa1kSxSDXXsRUODkYY2Uw==" { "_type" : { "_name" : "ActionsInvocationMetadata" }, "creatingWorkspaceFilePath" : { "_type" : { "_name" : "String" }, "_value" : "\/Users\/katsumi\/Develop\/Weather\/Weather.xcodeproj" },
  14. GitHub Checks API

  15. None
  16. Conclusion Summary Annotations

  17. None
  18. ط஌ͷ໰୊ɾ੍ݶࣄ߲ • Annotation͸̍εςοϓʹ͖ͭ10ݸ·ͰɺશମͰ50ݸ·Ͱ • UIςετதʹࡱͬͨεΫϦʔϯγϣοτΛΘ͔Γ΍͘͢ද͍ࣔͨ͠ • Artifactsʹอଘ͢Δ • Action಺͔Β௚઀ͷURLΛࢀর͢Δखஈ͕ͳ͍ •

    ը૾ͱͯ͠ࢀর͢Δखஈ͕ͳ͍ʢZipʹͳΔʣ • Releaseʹอଘ͢Δ • Releaseʹ͸λά͕ඞཁʢPR͝ͱʹ࡞Δʁʣ • ઐ༻ͷεΫϦʔϯγϣοτஔ͖৔ͷϦϙδτϦΛ࡞Δʁ • ϦϙδτϦʹίϛοτ͢Δ • ϦϙδτϦʹෆཁͳίϛοτ͕૿͑ΔʢϒϥϯνͰִ཭͢Ε͹͍͍͔΋ʣ • ઐ༻ͷϦϙδτϦΛ࡞Δʁ
  19. None
  20. References • ϝϧϖΠͰͷxcresult׆༻ࣄྫ | ϝϧΧϦΤϯδχΞϦϯά
 https://engineering.mercari.com/blog/entry/20201218-61f7110851/ • Xcode 11ͰͷςετपΓͷ৽ػೳΛ঺հ͠·͢ʂ -

    DeNA Testing Blog
 https://swet.dena.com/entry/2019/10/23/080000 • xcparse | ChargePoint
 https://www.chargepoint.com/engineering/xcparse/ • xcresulttool GitHub Actions
 https://github.com/kishikawakatsumi/xcresulttool