-
Notifications
You must be signed in to change notification settings - Fork 274
68 lines (59 loc) · 2.32 KB
/
snapshot-tests.yaml
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
name: Snapshot-Test
on:
pull_request:
push: # FIXME
workflow_dispatch:
inputs:
record:
description: 'Should Snapshots be recorded on CI?'
type: boolean
required: false
default: false
jobs:
run_snapshot_tests:
name: Run snapshot tests
runs-on: ubuntu-24.04
steps:
- name: Check out code
uses: actions/checkout@v4.2.2
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-test
- name: Enable recording
# if: ${{ github.event.inputs.record == 'true' }} # FIXME
run: echo 'RECORD_SNAPSHOTS_IF_REQUIRED=-Precord' >> $GITHUB_ENV
- name: Snapshot tests
uses: reactivecircus/android-emulator-runner@v2
timeout-minutes: 60
with:
api-level: 28
disable-animations: true
profile: pixel
arch : x86_64
emulator-options: ${{ vars.EMULATOR_OPTIONS }}
script: |
./gradlew stream-chat-android-ui-uitests:executeScreenshotTests ${{ env.RECORD_SNAPSHOTS_IF_REQUIRED }} \
-Pandroid.testInstrumentationRunnerArguments.filter=io.getstream.chat.android.uitests.util.SnapshotTestFilter \
-Dorg.gradle.jvmargs="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED"
# - name: Upload screnshot results
# if: failed() && ${{ github.event.inputs.record != 'true' }}
# uses: actions/upload-artifact@v3.1.0
# with:
# name: screenshots_reports
# path: ${{ github.workspace }}/stream-chat-android-ui-uitests/build/reports/*
- name: Upload screnshots
# if: ${{ github.event.inputs.record == 'true' }} # FIXME
uses: actions/upload-artifact@v3.1.0
with:
name: screenshots
path: ${{ github.workspace }}/stream-chat-android-ui-uitests/screenshots/
- name: Create Pull Request
# if: ${{ github.event.inputs.record == 'true' }} # FIXME
uses: peter-evans/create-pull-request@v4
with:
commit-message: "Update screenshots"
title: "Update screenshots"
delete-branch: true
reviewers: GetStream/android-developers-ui
branch: update-screenshots