UI tests #471
Workflow file for this run
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: UI tests | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
JAVA_VERSION: '17' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.JAVA_VERSION }} | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Enable KVM | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 34 | |
arch: x86_64 | |
target: default | |
profile: pixel_3 | |
emulator-boot-timeout: 1000 | |
disk-size: 8G | |
ram-size: 4048M | |
force-avd-creation: true | |
disable-spellchecker: true | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: scripts/run_ui_tests | |
- name: Upload screenshots | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshots | |
path: screenshots/ | |
- name: Create screenshot pull request if on main branch | |
uses: peter-evans/create-pull-request@v6 | |
if: github.ref == 'refs/heads/main' | |
with: | |
branch: feature/update_screenshots | |
title: Update of screenshots | |
commit-message: Update of screenshots | |
add-paths: | | |
screenshots/* | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test_report | |
path: | | |
app/build/reports/androidTests/connected/ | |
app/build/error_screenshots/ | |
- name: Upload screen recording | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: screenrecording | |
path: | | |
app/build/screenrecording/ |