Slide 1

Slide 1 text

GitHub Actions ͰϢχοτ ςετͷ݁ՌΛϨϙʔτ͢Δ 2021.11.17 potatotips #76 Hiroyuki Kusu ( @hkusu_ )

Slide 2

Slide 2 text

About me

Slide 3

Slide 3 text

ΈΜͳ͕஌ͬͯΔ͋ͷαʔϏεɺ ࣮͸ΏΊΈ͕࡞ͬͯ·͢ɻ શੈք5000ສMAUʹୡ͢ΔωοταʔϏεΛΦʔμʔϝΠυͰاըઃܭ͠ɺ γεςϜߏஙӡ༻͔ΒվળఏҊ·Ͱαϙʔτ͍͖ͯ͠·͢ɻ

Slide 4

Slide 4 text

name: Pull Request Chec k on: pull_reques t jobs : check : name: Chec k runs-on: ubuntu-20.0 4 steps : - name: Check ou t uses: actions/checkout@v 2 - name: Set up JD K uses: actions/setup-java@v 2 with : distribution: 'zulu ' java-version: 1 1 cache: 'gradle ' - name: Run unit tes t run: ./gradlew testDebugUnitTest Github Actions ͰϢχοτςετΛ࣮ߦ

Slide 5

Slide 5 text

ϫʔΫϑϩʔͷϩάʹςετ݁Ռ͕දࣔ͞ΕΔ͕෼͔ΓͮΒ͍

Slide 6

Slide 6 text

JUnit Report Action ( GitHub Actions ) https://github.com/marketplace/actions/junit-report-action

Slide 7

Slide 7 text

name: Pull Request Chec k on: pull_reques t jobs : check : name: Chec k runs-on: ubuntu-20.0 4 steps : - name: Check ou t uses: actions/checkout@v 2 - name: Set up JD K uses: actions/setup-java@v 2 with : distribution: 'zulu ' java-version: 1 1 cache: 'gradle ' - name: Run unit tes t run: ./gradlew testDebugUnitTes t - name: Publish Test Repor t if: cancelled() != tru e uses: mikepenz/action-junit-report@v 2 with : report_paths: '**/build/test-results/*/TEST-*.xml' ௥Ճ

Slide 8

Slide 8 text

ςετ݁ՌͷαϚϦʔ fail ͨ͠ςετίʔυ΁ίϝϯτ ։ൃऀؒͰɺςετ݁Ռʹର͢Δٞ࿦ΛϓϧϦΫ্Ͱߦ͏͜ͱ͕ग़དྷΔ

Slide 9

Slide 9 text

• ϓϧϦΫͰมߋ͍ͯ͠ͳ͍ϑΝΠϧʹରͯ͠΋஫ऍΛ͍ΕΔ͜ͱ ͕Ͱ͖Δ • ࠓճ࠾༻ͨ͠ GitHub Actions ( JUnit Report Action) ͕͜ͷ ػೳΛར༻͍ͯ͠Δ • ৄ͘͠͸ GitHub ͷ Checks API Λࢀর • https://docs.github.com/en/rest/reference/checks#runs

Slide 10

Slide 10 text

Thank you ! @hkusu_ ฐࣾ͸ Android ΤϯδχΞΛ ઈࢍืूத Ͱ͢ʂ