POC - RNG Emulator #980
Workflow file for this run
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: {} | |
jobs: | |
compare-screenshot-test: | |
runs-on: macos-latest | |
timeout-minutes: 20 | |
permissions: | |
contents: read # for clone | |
actions: write # for upload-artifact | |
steps: | |
- name: Checkout base branch | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2.12.0 | |
with: | |
gradle-version: wrapper | |
- name: Get base branch HEAD commit | |
id: get_base_branch_head | |
run: echo "sha=$(git rev-parse origin/${{ github.base_ref }})" >> "$GITHUB_OUTPUT" | |
- name: Checkout | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2 | |
continue-on-error: true | |
with: | |
name: screenshot | |
workflow: StoreScreenshot.yml | |
commit: ${{ steps.get_base_branch_head.outputs.sha }} | |
- name: compare screenshot test | |
id: compare-screenshot-test | |
run: | | |
./gradlew compareRoborazziDebug compareRoborazziDesktop compareRoborazziJvm compareRoborazziIosX64 --stacktrace --info | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | |
if: ${{ always() }} | |
with: | |
name: screenshot-diff | |
path: | | |
**/build/outputs/roborazzi | |
retention-days: 30 | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | |
if: ${{ always() }} | |
with: | |
name: screenshot-diff-reports | |
path: | | |
**/build/reports | |
**/build/outputs/roborazzi | |
retention-days: 30 | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | |
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@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2 | |
with: | |
name: pr | |
path: pr/ |