Skip to content

linux 31

linux 31 #954

Workflow file for this run

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: 31
disable-animations: true
profile: pixel
arch : x86_64
emulator-options: ${{ vars.EMULATOR_OPTIONS }}
script: ./gradlew stream-chat-android-ui-uitests:executeScreenshotTests -Pandroid.testInstrumentationRunnerArguments.filter=io.getstream.chat.android.uitests.util.SnapshotTestFilter ${{ env.RECORD_SNAPSHOTS_IF_REQUIRED }}
# - 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