Skip to content

Commit 43b8d53

Browse files
authored
Added workflows
1 parent fdc8dd4 commit 43b8d53

File tree

4 files changed

+143
-0
lines changed

4 files changed

+143
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run Paparazzi Record
2+
on:
3+
workflow_dispatch:
4+
env:
5+
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
6+
jobs:
7+
instrumentationTests:
8+
name: Screenshot Tests
9+
runs-on: macos-11
10+
defaults:
11+
run:
12+
working-directory: ./screenshot-test
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
token: ${{ secrets.API_TOKEN_GITHUB }}
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 11
21+
distribution: 'temurin'
22+
cache: gradle
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Record Paparazzi
26+
run: ./gradlew recordPaparazziDebug
27+
- name: Commit snapshot recording
28+
uses: stefanzweifel/git-auto-commit-action@v4
29+
with:
30+
file_pattern: "*.png"
31+
commit_message: Snapshots updated
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Verify Paparazzi Record
2+
on:
3+
workflow_dispatch:
4+
env:
5+
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
6+
jobs:
7+
instrumentationTests:
8+
name: Screenshot Tests
9+
runs-on: macos-11
10+
defaults:
11+
run:
12+
working-directory: ./screenshot-test
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
token: ${{ secrets.API_TOKEN_GITHUB }}
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 11
21+
distribution: 'temurin'
22+
cache: gradle
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Verify Paparazzi
26+
run: ./gradlew verifyPaparazziDebug
27+
- name: Commit snapshot recording
28+
uses: stefanzweifel/git-auto-commit-action@v4
29+
with:
30+
commit_message: Commit Report

.github/workflows/shot_record.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Run Shot Record
2+
on:
3+
workflow_dispatch:
4+
env:
5+
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
6+
jobs:
7+
instrumentationTests:
8+
name: Screenshot Tests
9+
runs-on: macos-11
10+
defaults:
11+
run:
12+
working-directory: ./screenshot-test
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
token: ${{ secrets.API_TOKEN_GITHUB }}
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 11
21+
distribution: 'temurin'
22+
cache: gradle
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Grant execute permission for action command
26+
run: chmod +x scripts/android_execute.sh
27+
- name: Record Screenshot
28+
uses: reactivecircus/android-emulator-runner@v2
29+
with:
30+
api-level: 28
31+
arch: x86
32+
profile: pixel_3a
33+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
34+
disable-animations: true
35+
working-directory: ./screenshot-test
36+
script: scripts/android_execute.sh executeScreenshotTests -Precord
37+
- name: Commit snapshot recording
38+
uses: stefanzweifel/git-auto-commit-action@v4
39+
with:
40+
file_pattern: "*.png"
41+
commit_message: Snapshots updated

.github/workflows/shot_verify.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Run shot verify
2+
on:
3+
workflow_dispatch:
4+
env:
5+
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
6+
jobs:
7+
instrumentationTests:
8+
name: Screenshot Tests
9+
runs-on: macos-11
10+
defaults:
11+
run:
12+
working-directory: ./screenshot-test
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
token: ${{ secrets.API_TOKEN_GITHUB }}
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 11
21+
distribution: 'temurin'
22+
cache: gradle
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Grant execute permission for action command
26+
run: chmod +x scripts/android_execute.sh
27+
- name: Verify screenshot
28+
uses: reactivecircus/android-emulator-runner@v2
29+
with:
30+
api-level: 28
31+
arch: x86
32+
profile: pixel_3a
33+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
34+
disable-animations: true
35+
working-directory: ./screenshot-test
36+
script: scripts/android_execute.sh executeScreenshotTests
37+
- uses: actions/upload-artifact@v2
38+
if: always()
39+
with:
40+
name: Reports
41+
path: app/build/reports/

0 commit comments

Comments
 (0)