Xcode Result Bundle データ構造 xcresulttool GitHub Checks GitHub Actions API 画像の表示 Undocumentedな制限事項 GitHub Flavored Markdown キレイに表示するコツ
GitHub ActionsͰςετͷ݁ՌΛΘ͔Γ͘͢දࣔ͢Δ
View Slide
GitHub ActionsͰςετͷ݁ՌΛΘ͔Γ͘͢දࣔ͢Δ• Xcode Result Bundle• σʔλߏ• xcresulttool• GitHub Checks• GitHub Actions• API• ը૾ͷදࣔ• Undocumentedͳ੍ݶࣄ߲• GitHub Flavored Markdown• ΩϨΠʹදࣔ͢Δίπ
https://github.com/kishikawakatsumi/xcresulttool-example/pull/2/checks?check_run_id=3954797886
Xcode result bundle
$ xcresulttool
xcresulttoolxcresulttool get --path Example.xcresult [--format json | raw] [--id ID]xcresulttool export --type [file | directory] --path Example.xcresult --output-path ./Out --id IDxcresulttool formatDescription [get] [--format json | text | markdown | typeHierarchy] [--hash]
xcresulttoolxcrun xcresulttool get --path __tests__/data/Example.xcresult --format json
xcresulttoolxcrun xcresulttool get --path __tests__/data/Example.xcresult --format json \--id “0~2h6n8a1U7EWQlPI84iSvAot2tGmEw4...QYjQ=="
xcresulttoolxcrun xcresulttool export --path __tests__/data/Example.xcresult \—id "0~bxJjbddFGu_5klZSLsMwAPnWdsfg1lVn1...W7A==" \--type file --output-path ./screenshot.png
GitHub Checks
ConclusionSummaryAnnotations
GitHub Checks• GitHub Actions֎෦ͷCIαʔϏε͔Βͷ݁ՌΛϑΟʔυόοΫͰ͖Δ• Pull Requestͷը໘ʹλϒ͕͋ΔͷͰΞΫηε͍͢͠• εςʔλεʢޭɾࣦഊʣ͚ͩͰͳ͘ɺϩάը૾ɺΞϊςʔγϣϯͳͲϦονͳใΛදࣔͰ͖Δ• ChecksΛߋ৽Ͱ͖ΔͷGitHub AppsʹݶΔ͕ɺGitHub ActionsAppѻ͍ʹͳ͍ͬͯΔͷͰߋ৽Ͱ͖Δ
ը૾ͷදࣔ
੍ݶࣄ߲• APIͷ֤߲ʹͤΔจࣈ࠷େ65535จࣈ• Ξϊςʔγϣϯ50ݸ·Ͱ
GitHub Flavored MarkdownͰΩϨΠʹϨΠΞτ͢Δ
ςʔϒϧͰϨΠΞτ͢Δ
·ͱΊ• GitHub ChecksPRͷը໘͔ΒΞΫηε͍͢͠• CIͷ݁ՌͰඞཁͳͷΛ͍Ζ͍Ζදࣔ͢Δͱศར• MarkdownʢʴHTMLʣ͕͑ΔͷͰϦονͳදࣔՄೳ
References• https://github.com/kishikawakatsumi/xcresulttool• https://github.com/kishikawakatsumi/bitrise-step-xcode-result-bundle-to-checks• https://github.com/ChargePoint/xcparse• https://engineering.mercari.com/blog/entry/20201218-61f7110851/