Added automation for Edit Button on Digital Invoice Screen. #44
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: Check Bank SDK - UI Tests | |
# TODO: Update triggers to execute only on workflow_call (from the release workflow) and via manual triggering | |
# (UI tests are slow and we should not run them on every push) | |
on: | |
push: | |
paths: | |
- 'bank-sdk/**' | |
- 'capture-sdk/**' | |
- 'bank-api-library/**' | |
- 'core-api-library/**' | |
- 'gradle/**' | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
pull_request: | |
types: [opened, edited, reopened] | |
paths: | |
- 'bank-sdk/**' | |
- 'capture-sdk/**' | |
- 'bank-api-library/**' | |
- 'core-api-library/**' | |
- 'gradle/**' | |
workflow_call: | |
secrets: | |
GINI_MOBILE_TEST_CLIENT_SECRET: | |
required: true | |
jobs: | |
ui-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: setup java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: enable KVM group perms for emulator | |
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: avd cache | |
uses: actions/cache@v4 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-x86_64-34-${{ github.ref_name }} | |
- name: create avd and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 34 | |
arch: x86_64 | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -no-audio -no-boot-anim -camera-back emulated | |
disable-animations: true | |
script: echo "Generated AVD snapshot for caching." | |
- name: run example app instrumented tests | |
timeout-minutes: 20 | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 34 | |
arch: x86_64 | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back emulated | |
disable-animations: true | |
script: > | |
adb uninstall net.gini.android.bank.sdk.exampleapp.test ; | |
adb push bank-sdk/example-app/src/androidTest/testDocuments/test_image.jpeg /sdcard/Download ; | |
adb shell am start -a android.intent.action.VIEW -n com.google.android.apps.photos/.home.HomeActivity -d file:///sdcard/Download/test_image.jpeg ; | |
adb push bank-sdk/example-app/src/androidTest/testDocuments/Testrechnung-RA-1.pdf /sdcard/Download ; | |
adb push bank-sdk/example-app/src/androidTest/testDocuments/sample.pdf /sdcard/Download ; | |
./gradlew bank-sdk:example-app:connectedDevExampleAppDebugAndroidTest | |
-PclientId="gini-mobile-test" | |
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" | |
- name: archive instrumented test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bank-sdk-example-app-instrumented-test-results | |
path: bank-sdk/example-app/build/outputs/androidTest-results/connected |