-
Notifications
You must be signed in to change notification settings - Fork 3
93 lines (77 loc) · 2.17 KB
/
CompareScreenshot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CompareScreenshot
on:
push:
branches:
- main
tags-ignore:
- 'v*'
paths-ignore:
- '**.md'
- '**.txt'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions: {}
env:
API_KEY: ${{ secrets.API_KEY }}
API_SECRET: ${{ secrets.API_SECRET }}
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@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: wrapper
- uses: dawidd6/action-download-artifact@v2
continue-on-error: true
with:
name: screenshot
workflow: StoreScreenshot.yml
branch: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.event.repository.default_branch }}
- name: compare screenshot test
id: compare-screenshot-test
run: |
./gradlew compareRoborazziDebug --stacktrace -Pscreenshot
- 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/