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

GitHub Actions でユニットテストの結果をレポートする

Hiroyuki Kusu
November 17, 2021

GitHub Actions でユニットテストの結果をレポートする

potatotips #76 ( https://potatotips.connpass.com/event/224395/ ) の資料

Hiroyuki Kusu

November 17, 2021
Tweet

More Decks by Hiroyuki Kusu

Other Decks in Technology

Transcript

  1.  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 ͰϢχοτςετΛ࣮ߦ
  2.  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' ௥Ճ
  3.  • ϓϧϦΫͰมߋ͍ͯ͠ͳ͍ϑΝΠϧʹରͯ͠΋஫ऍΛ͍ΕΔ͜ͱ ͕Ͱ͖Δ • ࠓճ࠾༻ͨ͠ GitHub Actions ( JUnit

    Report Action) ͕͜ͷ ػೳΛར༻͍ͯ͠Δ • ৄ͘͠͸ GitHub ͷ Checks API Λࢀর • https://docs.github.com/en/rest/reference/checks#runs