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

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

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

Kishikawa Katsumi

October 18, 2021
Tweet

More Decks by Kishikawa Katsumi

Other Decks in Programming

Transcript

  1. $ 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==" }
  2. $ 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==" }
  3. $ 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" },
  4. $ 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" },
  5. ط஌ͷ໰୊ɾ੍ݶࣄ߲ • Annotation͸̍εςοϓʹ͖ͭ10ݸ·ͰɺશମͰ50ݸ·Ͱ • UIςετதʹࡱͬͨεΫϦʔϯγϣοτΛΘ͔Γ΍͘͢ද͍ࣔͨ͠ • Artifactsʹอଘ͢Δ • Action಺͔Β௚઀ͷURLΛࢀর͢Δखஈ͕ͳ͍ •

    ը૾ͱͯ͠ࢀর͢Δखஈ͕ͳ͍ʢZipʹͳΔʣ • Releaseʹอଘ͢Δ • Releaseʹ͸λά͕ඞཁʢPR͝ͱʹ࡞Δʁʣ • ઐ༻ͷεΫϦʔϯγϣοτஔ͖৔ͷϦϙδτϦΛ࡞Δʁ • ϦϙδτϦʹίϛοτ͢Δ • ϦϙδτϦʹෆཁͳίϛοτ͕૿͑ΔʢϒϥϯνͰִ཭͢Ε͹͍͍͔΋ʣ • ઐ༻ͷϦϙδτϦΛ࡞Δʁ
  6. 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