Skip to content

UnitTest by ry-itto #1163

UnitTest by ry-itto

UnitTest by ry-itto #1163

Workflow file for this run

name: UnitTest
on:
push:
branches:
- main
pull_request:
run-name: "UnitTest by ${{ github.actor }}"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions: { }
jobs:
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read # for clone
actions: write # for upload-artifact
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: ./.github/actions/setup-java
- uses: dawidd6/action-download-artifact@v2
continue-on-error: true
with:
name: screenshot
workflow: UnitTest.yml
branch: main
- name: Upload an event payload for EnricoMi/publish-unit-test-result-action
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: event-payload
path: ${{ github.event_path }}
- name: Run local tests
run: ./gradlew testDevDebugUnitTest testDebugUnitTest --stacktrace
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: screenshot
path: |
**/build/outputs/roborazzi
retention-days: 30
- id: test-reports
if: always()
uses: ./.github/actions/upload-distributed-files
with:
copy-to: .test-reports
name: reports
name-type: directory
artifact-name: 'test-reports'
- id: test-results
if: always()
uses: ./.github/actions/upload-distributed-files
with:
copy-to: .test-results
name: "*.xml"
name-type: file
grep-by: /test-results/
artifact-name: 'test-results'