Compare screenshots on pull_request#923 by jmatsu #1543
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CompareScreenshot | |
on: | |
pull_request: | |
paths-ignore: | |
- 'app-ios/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
run-name: "Compare screenshots on ${{ github.event_name}}#${{ github.event.pull_request.number }} by ${{ github.actor }}" | |
permissions: { } | |
jobs: | |
compare-screenshot-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
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 | |
- run: ./gradlew compareRoborazziDebug compareRoborazziDevDebug --stacktrace -Pscreenshot | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
if: ${{ always() }} | |
with: | |
name: screenshot-diff | |
path: | | |
**/build/outputs/roborazzi | |
retention-days: 30 | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
if: ${{ always() }} | |
with: | |
name: screenshot-diff-reports | |
path: | | |
**/build/reports | |
retention-days: 30 | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
if: ${{ always() }} | |
with: | |
name: screenshot-diff-test-results | |
path: | | |
**/build/test-results | |
retention-days: 30 | |
- name: Save PR number | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
mkdir -p ./pr | |
echo ${{ github.event.number }} > ./pr/NR | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | |
with: | |
name: pr | |
path: pr/ |