Merge pull request #633 from qdsfdhvh/renovate/publish #400
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: | |
- master | |
pull_request: | |
paths: | |
- 'image-loader/src/**' | |
permissions: { } | |
jobs: | |
compare-screenshot-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
permissions: | |
contents: read # for clone | |
actions: write # for upload-artifact | |
steps: | |
- name: Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- 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@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0 | |
with: | |
gradle-version: wrapper | |
# Download screenshots from main branch | |
- uses: dawidd6/action-download-artifact@v6 | |
continue-on-error: true | |
with: | |
name: screenshot | |
workflow: StoreScreenshot.yml | |
branch: master | |
- name: compare screenshot test | |
id: compare-screenshot-test | |
run: ./gradlew compareRoborazzi --stacktrace --info | |
- uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: screenshot-diff | |
path: | | |
**/build/outputs/roborazzi | |
retention-days: 30 | |
- uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: screenshot-diff-reports | |
path: | | |
**/build/reports | |
retention-days: 30 | |
- uses: actions/upload-artifact@v4 | |
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@v4 | |
with: | |
name: pr | |
path: pr/ |