From c2e0dc6a2e5586c06a3e55e997f679455ff6cbd2 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Tue, 3 Feb 2026 13:36:25 +0100 Subject: [PATCH 01/38] feat: enable android emulator on E2E tests --- .github/workflows/android-emulator.yml | 182 +++++++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 .github/workflows/android-emulator.yml diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml new file mode 100644 index 00000000..2986f3cb --- /dev/null +++ b/.github/workflows/android-emulator.yml @@ -0,0 +1,182 @@ +name: Android Emulator E2E + +on: + workflow_call: + inputs: + apk-artifact-name: + required: true + type: string + apk-name: + required: true + type: string + package-name: + required: true + type: string + node-version: + required: true + type: string + test-suite: + description: name of robot test suite to run + required: true + type: string + api-version: + required: false + type: string + default: '30' + +env: + output_folder: ./TestsAutomation/Output + +jobs: + e2e-emulator-tests: + runs-on: ubuntu-large-emulator + continue-on-error: true + strategy: + matrix: + suite: + - 01_InitEnrollement + - 01_InitFirstSync + # - 02_SetupWorkspaces + # - 03_SDetAlerts + # - 03_SDetAlertsFilter + # - 03_2_SDetScan + # - 30_Diagnostic + fail-fast: false + env: + TZ: Europe/Paris + CI: true + ANDROID_HOME: ~/Android/Sdk + ANDROID_AVD: android-emulator + ANDROID_DEVICE: smartemu + arch: x86_64 + APPIUM_TEST_SERVER_PORT: 4723 + APPIUM_TEST_SERVER_HOST: 127.0.0.1 + _FORCE_LOGS: 1 + ANDROID_PACKAGE: ${{ inputs.package-name }} + steps: + - name: Checkout + uses: actions/checkout@v6 + + - 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 + + - uses: actions/setup-node@v6 + with: + node-version: ${{ inputs.node-version }} + cache-dependency-path: "package-lock.json" + cache: npm + + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: "3.9" + + - name: Setup Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: '17' + + - name: Gradle cache + uses: gradle/actions/setup-gradle@v5 + + - name: Install XVFB + run: sudo apt -y install xvfb + + - name: Add Android SDK to PATH + run: | + echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> $GITHUB_PATH + echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH + echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH + + - name: Setup Command Line Tools + run: | + mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ + wget -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip + unzip ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools + + - name: Accept Android SDK Licenses + run: | + yes | sdkmanager --licenses + + - name: Install Android SDK + run: | + sdkmanager --install sdkmanager "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "emulator" + + # - name: AVD cache + # uses: actions/cache@v5 + # id: avd-cache + # with: + # path: | + # ~/.android/avd/* + # ~/.android/adb* + # ~/.android/sdk/system-images/* + # ~/.android/debug.keystore + # key: avd-${{ inputs.api-version }}-adm64 + + - name: Create Android Emulator + run: | + avdmanager create avd -n $ANDROID_DEVICE -k "system-images;android-${{ inputs.api-version }};google_apis;x86_64" --device "pixel_8" + + - name: Install Node dependencies + working-directory: TestsAutomation + run: | + npm install + echo "$PWD/node_modules/.bin/" >> $GITHUB_PATH + + - name: Install Appium dependencies + working-directory: TestsAutomation + run: | + appium driver install espresso@${{ inputs.espresso-version }} + + - name: Install python packages + working-directory: TestsAutomation + run: pip3 install -U -r pip_requirements.txt + + - name: Download Artifact + uses: actions/Download-artifact@v7 + with: + name: app-e2e.apk + path: . + + - name: Start appium + run: | + xvfb-run appium -a 127.0.0.1 -p 4723 --base-path /wd/hub/ \ + --allow-insecure=adb_shell \ + --default-capabilities '{"appium:app": "${{ github.workspace }}/${{ env.smartway_apk_name }}"}' \ + --shell \ + --log-timestamp \ + --log ${{ env.output_folder }}/appium-server.log & + sleep 10 + + ################################# + # DEBUG MODE + ################################# + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + + - name: Run tests + working-directory: TestsAutomation/Suites + env: + ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation + run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:$ANDROID_DEVICE --variable DEVICE_SERIAL:${ANDROID_SERIAL_ID} --variable APP_PACKAGE:ai.smartway.smartapp ./ + + - name: Upload Tests Report + if: always() + uses: actions/upload-artifact@v6 + with: + name: E2E-Fosapp-TestReport-${{ matrix.device-type }}-${{ matrix.api-version }}-${{ matrix.arch }}-${{ matrix.shard }} + path: | + ${{ github.workspace }}/e2e-tests/output/appium.log + ${{ github.workspace }}/e2e-tests/output/allure-report + ${{ github.workspace }}/e2e-tests/output/records + + - name: Upload Tests Report + if: always() + uses: actions/upload-artifact@v5 + with: + name: RobotFramework-TestReport-${{ matrix.suite }} + path: ${{ env.output_folder }} \ No newline at end of file From 3c74bd654300cb2834f24de5d95625c1d1cc0c40 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Tue, 3 Feb 2026 13:52:30 +0100 Subject: [PATCH 02/38] test --- .github/workflows/android-emulator.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 2986f3cb..068dbbda 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -3,21 +3,8 @@ name: Android Emulator E2E on: workflow_call: inputs: - apk-artifact-name: - required: true - type: string - apk-name: - required: true - type: string package-name: - required: true - type: string - node-version: - required: true - type: string - test-suite: - description: name of robot test suite to run - required: true + required: false type: string api-version: required: false @@ -65,7 +52,7 @@ jobs: - uses: actions/setup-node@v6 with: - node-version: ${{ inputs.node-version }} + node-version: 20 cache-dependency-path: "package-lock.json" cache: npm From 82fdef445674af9f73747c26f95bb8d0722d47f5 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Tue, 3 Feb 2026 14:03:24 +0100 Subject: [PATCH 03/38] test --- .github/workflows/android-emulator.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 068dbbda..fb6bd20f 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -22,7 +22,7 @@ jobs: matrix: suite: - 01_InitEnrollement - - 01_InitFirstSync + # - 01_InitFirstSync # - 02_SetupWorkspaces # - 03_SDetAlerts # - 03_SDetAlertsFilter @@ -53,7 +53,6 @@ jobs: - uses: actions/setup-node@v6 with: node-version: 20 - cache-dependency-path: "package-lock.json" cache: npm - name: Setup Python From 255ae02fa5e6b9f6f8fe316c4889ef1598071313 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Tue, 3 Feb 2026 14:14:22 +0100 Subject: [PATCH 04/38] test --- .github/workflows/android-emulator.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index fb6bd20f..9bec2ac5 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -49,6 +49,12 @@ jobs: 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 + + ################################# + # DEBUG MODE + ################################# + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - uses: actions/setup-node@v6 with: @@ -122,11 +128,11 @@ jobs: working-directory: TestsAutomation run: pip3 install -U -r pip_requirements.txt - - name: Download Artifact - uses: actions/Download-artifact@v7 - with: - name: app-e2e.apk - path: . + # - name: Download Artifact + # uses: actions/Download-artifact@v7 + # with: + # name: app-e2e.apk + # path: . - name: Start appium run: | From c5465df7df39c225763570c23ffa365576435858 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Tue, 3 Feb 2026 14:49:54 +0100 Subject: [PATCH 05/38] test --- .github/workflows/android-emulator.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 9bec2ac5..1b39d8e1 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -59,7 +59,9 @@ jobs: - uses: actions/setup-node@v6 with: node-version: 20 + cache-dependency-path: src/ cache: npm + - name: Setup Python uses: actions/setup-python@v6 From 4230eea57779e53cf9964da5f84c379688beb306 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Tue, 3 Feb 2026 14:57:32 +0100 Subject: [PATCH 06/38] test --- .github/workflows/android-emulator.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 1b39d8e1..0f9dfdb1 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -49,13 +49,7 @@ jobs: 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 - - ################################# - # DEBUG MODE - ################################# - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - + - uses: actions/setup-node@v6 with: node-version: 20 @@ -81,15 +75,21 @@ jobs: run: sudo apt -y install xvfb - name: Add Android SDK to PATH - run: | - echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> $GITHUB_PATH - echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH - echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH + run: echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> $GITHUB_PATH + + - name: Add Android Platform-tools to PATH + run: echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH + + - name: Add Android Emulator to PATH + run: echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH + + - name: Show env + run: env - name: Setup Command Line Tools run: | mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ - wget -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip + wget -nv -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip unzip ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools - name: Accept Android SDK Licenses From 0be9828b9a19fa1f1c7c77489247dd10df016a3a Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 15:12:45 +0100 Subject: [PATCH 07/38] test --- .github/workflows/android-emulator.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 0f9dfdb1..9010810c 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -90,8 +90,14 @@ jobs: run: | mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ wget -nv -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip - unzip ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools - + unzip -q ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools + + ################################# + # DEBUG MODE + ################################# + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + - name: Accept Android SDK Licenses run: | yes | sdkmanager --licenses From 06ed49262dcd175d9dcddf0962e8b46ca8ed7366 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 15:33:21 +0100 Subject: [PATCH 08/38] test --- .github/workflows/android-emulator.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 9010810c..79c05557 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -32,8 +32,8 @@ jobs: env: TZ: Europe/Paris CI: true - ANDROID_HOME: ~/Android/Sdk - ANDROID_AVD: android-emulator + ANDROID_HOME: /usr/local/lib/android/sdk + ANDROID_SDK_ROOT: /usr/local/lib/android/sdk ANDROID_DEVICE: smartemu arch: x86_64 APPIUM_TEST_SERVER_PORT: 4723 @@ -82,21 +82,26 @@ jobs: - name: Add Android Emulator to PATH run: echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH - - - name: Show env - run: env - name: Setup Command Line Tools run: | + echo "Deleting default SDK setup" + rm -rf $ANDROID_HOME/* + unset `env | grep ANDROID_NDK | egrep -o '^[^=]+'` + echo "Creating ANDROID_HOME dir at: $ANDROID_HOME" mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ + echo "Downloading Command Line Tools" wget -nv -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip + echo "Uncompressing Command Line Tools" unzip -q ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools - ################################# - # DEBUG MODE - ################################# - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 + - name: Show env + run: env + # ################################# + # # DEBUG MODE + # ################################# + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 - name: Accept Android SDK Licenses run: | From c56cf5dc54b56bd155aab63232e59dbf8c67d9bd Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 15:40:10 +0100 Subject: [PATCH 09/38] test --- .github/workflows/android-emulator.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 79c05557..adc33b5c 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -85,14 +85,14 @@ jobs: - name: Setup Command Line Tools run: | - echo "Deleting default SDK setup" + echo "➡️ Deleting default SDK setup" rm -rf $ANDROID_HOME/* unset `env | grep ANDROID_NDK | egrep -o '^[^=]+'` - echo "Creating ANDROID_HOME dir at: $ANDROID_HOME" + echo "➡️ Creating ANDROID_HOME dir at: $ANDROID_HOME" mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ - echo "Downloading Command Line Tools" + echo "➡️ Downloading Command Line Tools" wget -nv -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip - echo "Uncompressing Command Line Tools" + echo "➡️ Uncompressing Command Line Tools" unzip -q ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools - name: Show env @@ -109,7 +109,7 @@ jobs: - name: Install Android SDK run: | - sdkmanager --install sdkmanager "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "emulator" + sdkmanager --install "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "emulator" # - name: AVD cache # uses: actions/cache@v5 From 966364862e54c2676036489d488da8b55f3d1a98 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 15:47:04 +0100 Subject: [PATCH 10/38] test --- .github/workflows/android-emulator.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index adc33b5c..5cc31bb0 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -94,14 +94,6 @@ jobs: wget -nv -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip echo "➡️ Uncompressing Command Line Tools" unzip -q ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools - - - name: Show env - run: env - # ################################# - # # DEBUG MODE - # ################################# - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - name: Accept Android SDK Licenses run: | From a5aa16e135d4c3270c3fba71c2ff944a82ca1b71 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 15:50:46 +0100 Subject: [PATCH 11/38] test --- .github/workflows/android-emulator.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 5cc31bb0..bae4aa68 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -10,6 +10,11 @@ on: required: false type: string default: '30' + espresso-version: + description: espresso version to use + required: false + default: 3.5.1 + type: string env: output_folder: ./TestsAutomation/Output @@ -91,7 +96,7 @@ jobs: echo "➡️ Creating ANDROID_HOME dir at: $ANDROID_HOME" mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ echo "➡️ Downloading Command Line Tools" - wget -nv -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip + wget --progress=bar:force:noscroll -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip echo "➡️ Uncompressing Command Line Tools" unzip -q ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools From 09635253b471ffefb3dbc31c7b0ba5bb91cae069 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 15:52:17 +0100 Subject: [PATCH 12/38] test --- .github/workflows/android-emulator.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index bae4aa68..933ed2fc 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -92,6 +92,7 @@ jobs: run: | echo "➡️ Deleting default SDK setup" rm -rf $ANDROID_HOME/* + echo "➡️ Unsetting vars: $(env | grep ANDROID_NDK | egrep -o '^[^=]+')" unset `env | grep ANDROID_NDK | egrep -o '^[^=]+'` echo "➡️ Creating ANDROID_HOME dir at: $ANDROID_HOME" mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ From b26610fbc8dc350f410eea80125853319e4249db Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 16:22:38 +0100 Subject: [PATCH 13/38] test --- .github/workflows/android-emulator.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 933ed2fc..a9e39bdf 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -38,6 +38,7 @@ jobs: TZ: Europe/Paris CI: true ANDROID_HOME: /usr/local/lib/android/sdk + ANDROID_AVD_HOME: /home/runner/.config/.android/avd ANDROID_SDK_ROOT: /usr/local/lib/android/sdk ANDROID_DEVICE: smartemu arch: x86_64 @@ -60,7 +61,6 @@ jobs: node-version: 20 cache-dependency-path: src/ cache: npm - - name: Setup Python uses: actions/setup-python@v6 @@ -155,6 +155,11 @@ jobs: --log ${{ env.output_folder }}/appium-server.log & sleep 10 + - name: Start Emulator + run: | + emulator -avd $ANDROID_DEVICE -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -verbose -qemu -m 4096 -enable-kvm & + # sleep 10 + ################################# # DEBUG MODE ################################# From e4b7f944558429e3fb254a9f5f87d891978b748b Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 17:04:43 +0100 Subject: [PATCH 14/38] test --- .github/workflows/android-emulator.yml | 43 ++++++++++++++++---------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index a9e39bdf..53806e46 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -157,30 +157,39 @@ jobs: - name: Start Emulator run: | - emulator -avd $ANDROID_DEVICE -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -verbose -qemu -m 4096 -enable-kvm & - # sleep 10 + emulator -avd $ANDROID_DEVICE -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -cores 4 -memory 4096 -verbose -qemu -m 4096 -enable-kvm & - ################################# - # DEBUG MODE - ################################# - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 + - name: Check emulator Readiness + run: | + adb wait-for-device + # Health Check - Verify emulator is fully booted + echo "🔍 Checking emulator health status..." + adb shell getprop sys.boot_completed + adb shell getprop init.svc.bootanim + # Wait for emulator to fully ready + sleep 10 + + # ################################# + # # DEBUG MODE + # ################################# + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 - name: Run tests working-directory: TestsAutomation/Suites env: ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation - run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:$ANDROID_DEVICE --variable DEVICE_SERIAL:${ANDROID_SERIAL_ID} --variable APP_PACKAGE:ai.smartway.smartapp ./ + run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:emulator-5554 --variable DEVICE_SERIAL:emulator-5554 --variable APP_PACKAGE:ai.smartway.smartapp ./ - - name: Upload Tests Report - if: always() - uses: actions/upload-artifact@v6 - with: - name: E2E-Fosapp-TestReport-${{ matrix.device-type }}-${{ matrix.api-version }}-${{ matrix.arch }}-${{ matrix.shard }} - path: | - ${{ github.workspace }}/e2e-tests/output/appium.log - ${{ github.workspace }}/e2e-tests/output/allure-report - ${{ github.workspace }}/e2e-tests/output/records + # - name: Upload Tests Report + # if: always() + # uses: actions/upload-artifact@v6 + # with: + # name: E2E-Fosapp-TestReport-${{ matrix.device-type }}-${{ matrix.api-version }}-${{ matrix.arch }}-${{ matrix.shard }} + # path: | + # ${{ github.workspace }}/e2e-tests/output/appium.log + # ${{ github.workspace }}/e2e-tests/output/allure-report + # ${{ github.workspace }}/e2e-tests/output/records - name: Upload Tests Report if: always() From 28168ef478da6672aebacc4ae536d9fa2c07edac Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 17:28:34 +0100 Subject: [PATCH 15/38] test --- .github/workflows/android-emulator.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 53806e46..8e164bde 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -92,8 +92,6 @@ jobs: run: | echo "➡️ Deleting default SDK setup" rm -rf $ANDROID_HOME/* - echo "➡️ Unsetting vars: $(env | grep ANDROID_NDK | egrep -o '^[^=]+')" - unset `env | grep ANDROID_NDK | egrep -o '^[^=]+'` echo "➡️ Creating ANDROID_HOME dir at: $ANDROID_HOME" mkdir -p $ANDROID_HOME/cmdline-tools/latest && cd $_ echo "➡️ Downloading Command Line Tools" @@ -130,15 +128,15 @@ jobs: npm install echo "$PWD/node_modules/.bin/" >> $GITHUB_PATH - - name: Install Appium dependencies - working-directory: TestsAutomation - run: | - appium driver install espresso@${{ inputs.espresso-version }} - - name: Install python packages working-directory: TestsAutomation run: pip3 install -U -r pip_requirements.txt + - name: Install Appium dependencies + working-directory: TestsAutomation + run: | + appium driver install espresso@${{ inputs.espresso-version }} + # - name: Download Artifact # uses: actions/Download-artifact@v7 # with: @@ -146,6 +144,7 @@ jobs: # path: . - name: Start appium + working-directory: TestsAutomation run: | xvfb-run appium -a 127.0.0.1 -p 4723 --base-path /wd/hub/ \ --allow-insecure=adb_shell \ @@ -153,11 +152,10 @@ jobs: --shell \ --log-timestamp \ --log ${{ env.output_folder }}/appium-server.log & - sleep 10 - name: Start Emulator run: | - emulator -avd $ANDROID_DEVICE -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -cores 4 -memory 4096 -verbose -qemu -m 4096 -enable-kvm & + emulator -avd $ANDROID_DEVICE -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -cores 4 -memory 4096 -verbose -qemu -m 4096 -smp cores=4 -enable-kvm & - name: Check emulator Readiness run: | @@ -169,11 +167,11 @@ jobs: # Wait for emulator to fully ready sleep 10 - # ################################# - # # DEBUG MODE - # ################################# - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 + ################################# + # DEBUG MODE + ################################# + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - name: Run tests working-directory: TestsAutomation/Suites From 96c9e5df2335bec31c800fce82445e914cac28aa Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 17:47:47 +0100 Subject: [PATCH 16/38] test --- .github/workflows/android-emulator.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 8e164bde..55643f06 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -165,13 +165,19 @@ jobs: adb shell getprop sys.boot_completed adb shell getprop init.svc.bootanim # Wait for emulator to fully ready - sleep 10 + sleep 20 + # Try to close SystemUI ANR prompt + adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS + adb shell settings put secure immersive_mode_confirmations confirmed + adb shell input keyevent 3 + # Enable developer mode + adb shell settings put global development_settings_enabled 1 - ################################# - # DEBUG MODE - ################################# - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 + # ################################ + # # DEBUG MODE + # ################################# + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 - name: Run tests working-directory: TestsAutomation/Suites From cd5819c1f6fca3be7b5284e619fb1a6437f6d440 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 18:13:27 +0100 Subject: [PATCH 17/38] feat: implemant caching for sdk and avd --- .github/workflows/android-emulator.yml | 54 ++++++++++++++++---------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 55643f06..44c7756d 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -87,8 +87,28 @@ jobs: - name: Add Android Emulator to PATH run: echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH - + + - name: Cache Android SDK + id: cache-android-sdk + uses: actions/cache@v4 + with: + path: | + ${{ env.ANDROID_HOME }}/cmdline-tools + ${{ env.ANDROID_HOME }}/platform-tools + ${{ env.ANDROID_HOME }}/platforms + ${{ env.ANDROID_HOME }}/system-images + ${{ env.ANDROID_HOME }}/emulator + key: android-sdk-${{ inputs.api-version }} + + - name: Cache Android AVD + id: cache-avd + uses: actions/cache@v4 + with: + path: ${{ env.ANDROID_AVD_HOME }} + key: android-avd-${{ inputs.api-version }} + - name: Setup Command Line Tools + if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: | echo "➡️ Deleting default SDK setup" rm -rf $ANDROID_HOME/* @@ -100,25 +120,20 @@ jobs: unzip -q ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools - name: Accept Android SDK Licenses + if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: | yes | sdkmanager --licenses - name: Install Android SDK + if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: | sdkmanager --install "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "emulator" - - # - name: AVD cache - # uses: actions/cache@v5 - # id: avd-cache - # with: - # path: | - # ~/.android/avd/* - # ~/.android/adb* - # ~/.android/sdk/system-images/* - # ~/.android/debug.keystore - # key: avd-${{ inputs.api-version }}-adm64 + - name: Create AVD Home Directory + run: mkdir -p ${{ env.ANDROID_AVD_HOME }} + - name: Create Android Emulator + if: steps.cache-avd.outputs.cache-hit != 'true' run: | avdmanager create avd -n $ANDROID_DEVICE -k "system-images;android-${{ inputs.api-version }};google_apis;x86_64" --device "pixel_8" @@ -185,15 +200,12 @@ jobs: ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:emulator-5554 --variable DEVICE_SERIAL:emulator-5554 --variable APP_PACKAGE:ai.smartway.smartapp ./ - # - name: Upload Tests Report - # if: always() - # uses: actions/upload-artifact@v6 - # with: - # name: E2E-Fosapp-TestReport-${{ matrix.device-type }}-${{ matrix.api-version }}-${{ matrix.arch }}-${{ matrix.shard }} - # path: | - # ${{ github.workspace }}/e2e-tests/output/appium.log - # ${{ github.workspace }}/e2e-tests/output/allure-report - # ${{ github.workspace }}/e2e-tests/output/records + - name: Upload Appium Report + if: always() + uses: actions/upload-artifact@v5 + with: + name: Emulator-Appium-TestReport-${{ inputs.suite-name}} + path: ${{ env.output_folder }} - name: Upload Tests Report if: always() From 4e96612f344f8c97acb928832bb6bbb5f70bf2fe Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 18:17:04 +0100 Subject: [PATCH 18/38] test --- .github/workflows/android-emulator.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 44c7756d..12b17f47 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -200,12 +200,13 @@ jobs: ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:emulator-5554 --variable DEVICE_SERIAL:emulator-5554 --variable APP_PACKAGE:ai.smartway.smartapp ./ - - name: Upload Appium Report + - name: Upload Appium Server Logs if: always() uses: actions/upload-artifact@v5 with: - name: Emulator-Appium-TestReport-${{ inputs.suite-name}} - path: ${{ env.output_folder }} + name: Appium-Server-Logs-${{ matrix.suite }} + path: ${{ env.output_folder }}/appium-server.log + if-no-files-found: warn - name: Upload Tests Report if: always() From ededfcb9bbc33ebf798058e42976f5eb85f3f8be Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Wed, 4 Feb 2026 18:23:57 +0100 Subject: [PATCH 19/38] test --- .github/workflows/android-emulator.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 12b17f47..a7470042 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -188,11 +188,6 @@ jobs: # Enable developer mode adb shell settings put global development_settings_enabled 1 - # ################################ - # # DEBUG MODE - # ################################# - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - name: Run tests working-directory: TestsAutomation/Suites @@ -200,6 +195,12 @@ jobs: ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:emulator-5554 --variable DEVICE_SERIAL:emulator-5554 --variable APP_PACKAGE:ai.smartway.smartapp ./ + # ################################ + # # DEBUG MODE + # ################################# + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + - name: Upload Appium Server Logs if: always() uses: actions/upload-artifact@v5 From 1046e022e5304980705d8b499a24a16fa8e2777a Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 09:24:04 +0100 Subject: [PATCH 20/38] test --- .github/workflows/android-emulator.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index a7470042..a3ba8249 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -195,11 +195,11 @@ jobs: ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:emulator-5554 --variable DEVICE_SERIAL:emulator-5554 --variable APP_PACKAGE:ai.smartway.smartapp ./ - # ################################ - # # DEBUG MODE - # ################################# - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 + ################################ + # DEBUG MODE + ################################# + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - name: Upload Appium Server Logs if: always() From eb69a44c89df79a89cf1fd777626e93d129ebdf1 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 09:56:00 +0100 Subject: [PATCH 21/38] test --- .github/workflows/android-emulator.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index a3ba8249..9ff92cd7 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -199,6 +199,7 @@ jobs: # DEBUG MODE ################################# - name: Setup tmate session + if: always() uses: mxschmitt/action-tmate@v3 - name: Upload Appium Server Logs From e9919a32cb859d2cce7a7113a8aa6aa9cdcaed9b Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 09:56:51 +0100 Subject: [PATCH 22/38] test --- .github/workflows/android-emulator.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 9ff92cd7..f0ae04d1 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -90,7 +90,7 @@ jobs: - name: Cache Android SDK id: cache-android-sdk - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ${{ env.ANDROID_HOME }}/cmdline-tools @@ -102,7 +102,7 @@ jobs: - name: Cache Android AVD id: cache-avd - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} From b611f3cc91d9dda2a6319083a247dd61ee71e430 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 10:18:15 +0100 Subject: [PATCH 23/38] test --- .github/workflows/android-emulator.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index f0ae04d1..d8576d58 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -90,7 +90,7 @@ jobs: - name: Cache Android SDK id: cache-android-sdk - uses: actions/cache@v5 + uses: actions/cache/restore@v5 with: path: | ${{ env.ANDROID_HOME }}/cmdline-tools @@ -102,7 +102,7 @@ jobs: - name: Cache Android AVD id: cache-avd - uses: actions/cache@v5 + uses: actions/cache/restore@v5 with: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} @@ -130,6 +130,7 @@ jobs: sdkmanager --install "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "emulator" - name: Create AVD Home Directory + if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: mkdir -p ${{ env.ANDROID_AVD_HOME }} - name: Create Android Emulator @@ -166,7 +167,7 @@ jobs: --default-capabilities '{"appium:app": "${{ github.workspace }}/${{ env.smartway_apk_name }}"}' \ --shell \ --log-timestamp \ - --log ${{ env.output_folder }}/appium-server.log & + --log ./appium-server.log & - name: Start Emulator run: | @@ -201,6 +202,25 @@ jobs: - name: Setup tmate session if: always() uses: mxschmitt/action-tmate@v3 + + - name: Save Cache Android SDK + if: steps.cache-android-sdk.outputs.cache-hit != 'true' + uses: actions/cache/save@v5 + with: + path: | + ${{ env.ANDROID_HOME }}/cmdline-tools + ${{ env.ANDROID_HOME }}/platform-tools + ${{ env.ANDROID_HOME }}/platforms + ${{ env.ANDROID_HOME }}/system-images + ${{ env.ANDROID_HOME }}/emulator + key: android-sdk-${{ inputs.api-version }} + + - name: Save Cache Android AVD + if: steps.cache-avd.outputs.cache-hit != 'true' + uses: actions/cache/save@v5 + with: + path: ${{ env.ANDROID_AVD_HOME }} + key: android-avd-${{ inputs.api-version }} - name: Upload Appium Server Logs if: always() From 4c5c1a6ef50396de2e5dc2f0f30e42b8857e8e90 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 11:47:11 +0100 Subject: [PATCH 24/38] test --- .github/workflows/android-emulator.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index d8576d58..88bcbbaa 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -204,7 +204,7 @@ jobs: uses: mxschmitt/action-tmate@v3 - name: Save Cache Android SDK - if: steps.cache-android-sdk.outputs.cache-hit != 'true' + if: steps.cache-android-sdk.outputs.cache-hit != 'true'|| failure() uses: actions/cache/save@v5 with: path: | @@ -216,7 +216,7 @@ jobs: key: android-sdk-${{ inputs.api-version }} - name: Save Cache Android AVD - if: steps.cache-avd.outputs.cache-hit != 'true' + if: steps.cache-avd.outputs.cache-hit != 'true' || failure() uses: actions/cache/save@v5 with: path: ${{ env.ANDROID_AVD_HOME }} @@ -227,7 +227,7 @@ jobs: uses: actions/upload-artifact@v5 with: name: Appium-Server-Logs-${{ matrix.suite }} - path: ${{ env.output_folder }}/appium-server.log + path: TestsAutomation/appium-server.log if-no-files-found: warn - name: Upload Tests Report @@ -235,4 +235,5 @@ jobs: uses: actions/upload-artifact@v5 with: name: RobotFramework-TestReport-${{ matrix.suite }} - path: ${{ env.output_folder }} \ No newline at end of file + path: ${{ env.output_folder }} + if-no-files-found: warn \ No newline at end of file From cfef361d5ee3fbfafb7ac25f128a8664c9932a22 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 11:47:44 +0100 Subject: [PATCH 25/38] test --- .github/workflows/android-emulator.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 88bcbbaa..fa9b3ab6 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -196,12 +196,12 @@ jobs: ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:emulator-5554 --variable DEVICE_SERIAL:emulator-5554 --variable APP_PACKAGE:ai.smartway.smartapp ./ - ################################ - # DEBUG MODE - ################################# - - name: Setup tmate session - if: always() - uses: mxschmitt/action-tmate@v3 + # ################################ + # # DEBUG MODE + # ################################# + # - name: Setup tmate session + # if: always() + # uses: mxschmitt/action-tmate@v3 - name: Save Cache Android SDK if: steps.cache-android-sdk.outputs.cache-hit != 'true'|| failure() From 21f5bb0245a30e0b66106edc6e4c6c2a3ec50301 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 12:02:45 +0100 Subject: [PATCH 26/38] test --- .github/workflows/android-emulator.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index fa9b3ab6..f14ed4be 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -160,11 +160,10 @@ jobs: # path: . - name: Start appium - working-directory: TestsAutomation - run: | + run: | xvfb-run appium -a 127.0.0.1 -p 4723 --base-path /wd/hub/ \ --allow-insecure=adb_shell \ - --default-capabilities '{"appium:app": "${{ github.workspace }}/${{ env.smartway_apk_name }}"}' \ + --default-capabilities '{"appium:app": "./app-e2e.apk", "appium:espressoBuildConfig": "./TestsAutomation/config.json"}' \ --shell \ --log-timestamp \ --log ./appium-server.log & @@ -204,7 +203,7 @@ jobs: # uses: mxschmitt/action-tmate@v3 - name: Save Cache Android SDK - if: steps.cache-android-sdk.outputs.cache-hit != 'true'|| failure() + if: steps.cache-android-sdk.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: path: | @@ -216,7 +215,7 @@ jobs: key: android-sdk-${{ inputs.api-version }} - name: Save Cache Android AVD - if: steps.cache-avd.outputs.cache-hit != 'true' || failure() + if: steps.cache-avd.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: path: ${{ env.ANDROID_AVD_HOME }} @@ -227,7 +226,7 @@ jobs: uses: actions/upload-artifact@v5 with: name: Appium-Server-Logs-${{ matrix.suite }} - path: TestsAutomation/appium-server.log + path: appium-server.log if-no-files-found: warn - name: Upload Tests Report From 76a97e306364a86426b197660ca2e00e3961b42f Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 14:28:20 +0100 Subject: [PATCH 27/38] test --- .github/workflows/android-emulator.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index f14ed4be..93c1fafc 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -160,6 +160,7 @@ jobs: # path: . - name: Start appium + working-directory: TestsAutomation run: | xvfb-run appium -a 127.0.0.1 -p 4723 --base-path /wd/hub/ \ --allow-insecure=adb_shell \ @@ -226,7 +227,7 @@ jobs: uses: actions/upload-artifact@v5 with: name: Appium-Server-Logs-${{ matrix.suite }} - path: appium-server.log + path: ./TestsAutomation/appium-server.log if-no-files-found: warn - name: Upload Tests Report From b03cebe04cc5964ee7e0da159c835361dbb71038 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 15:00:16 +0100 Subject: [PATCH 28/38] test --- .github/workflows/android-emulator.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 93c1fafc..76bb44d6 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -196,12 +196,12 @@ jobs: ROOT_PROJECT_PATH: ${{ github.workspace }}/TestsAutomation run: python3 -m robot -s 01_InitApplication -s ${{ matrix.suite }} -d ../Output/ --variable DEVICE_ADB_ID:emulator-5554 --variable DEVICE_SERIAL:emulator-5554 --variable APP_PACKAGE:ai.smartway.smartapp ./ - # ################################ - # # DEBUG MODE - # ################################# - # - name: Setup tmate session - # if: always() - # uses: mxschmitt/action-tmate@v3 + ################################ + # DEBUG MODE + ################################# + - name: Setup tmate session + if: always() + uses: mxschmitt/action-tmate@v3 - name: Save Cache Android SDK if: steps.cache-android-sdk.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG From d6f24c2ec5aa3022dfe19a172dd2faa67fb1f467 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 15:32:54 +0100 Subject: [PATCH 29/38] test --- .github/workflows/android-emulator.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 76bb44d6..ece08c11 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -93,9 +93,6 @@ jobs: uses: actions/cache/restore@v5 with: path: | - ${{ env.ANDROID_HOME }}/cmdline-tools - ${{ env.ANDROID_HOME }}/platform-tools - ${{ env.ANDROID_HOME }}/platforms ${{ env.ANDROID_HOME }}/system-images ${{ env.ANDROID_HOME }}/emulator key: android-sdk-${{ inputs.api-version }} @@ -208,9 +205,6 @@ jobs: uses: actions/cache/save@v5 with: path: | - ${{ env.ANDROID_HOME }}/cmdline-tools - ${{ env.ANDROID_HOME }}/platform-tools - ${{ env.ANDROID_HOME }}/platforms ${{ env.ANDROID_HOME }}/system-images ${{ env.ANDROID_HOME }}/emulator key: android-sdk-${{ inputs.api-version }} From cd35844260b800a21b2afedc6cba6970cf057334 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 16:00:37 +0100 Subject: [PATCH 30/38] to remove --- .github/workflows/android-emulator.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index ece08c11..79831ddd 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -95,6 +95,8 @@ jobs: path: | ${{ env.ANDROID_HOME }}/system-images ${{ env.ANDROID_HOME }}/emulator + ${{ env.ANDROID_HOME }}/licenses + ${{ env.ANDROID_HOME }}/build-tools key: android-sdk-${{ inputs.api-version }} - name: Cache Android AVD @@ -104,8 +106,15 @@ jobs: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} + - name: Cache Appium Dependencies + id: cache-appium + uses: actions/cache/restore@v5 + with: + path: TestsAutomation/node_modules + key: appium-node-modules-${{ hashFiles('TestsAutomation/package-lock.json') }} + - name: Setup Command Line Tools - if: steps.cache-android-sdk.outputs.cache-hit != 'true' + # if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: | echo "➡️ Deleting default SDK setup" rm -rf $ANDROID_HOME/* @@ -124,10 +133,10 @@ jobs: - name: Install Android SDK if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: | - sdkmanager --install "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "emulator" + sdkmanager --install "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "build-tools;${{ inputs.api-version }}.0.0" "emulator" - name: Create AVD Home Directory - if: steps.cache-android-sdk.outputs.cache-hit != 'true' + if: steps.cache-avd.outputs.cache-hit != 'true' run: mkdir -p ${{ env.ANDROID_AVD_HOME }} - name: Create Android Emulator @@ -215,7 +224,14 @@ jobs: with: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} - + + - name: Save Appium Cache + if: steps.cache-appium.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG + uses: actions/cache/save@v5 + with: + path: TestsAutomation/node_modules + key: appium-node-modules-${{ hashFiles('TestsAutomation/package-lock.json') }} + - name: Upload Appium Server Logs if: always() uses: actions/upload-artifact@v5 From eb8a5d8b0830624341df07577964cbf5c9be2765 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 16:37:22 +0100 Subject: [PATCH 31/38] to remove --- .github/workflows/android-emulator.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 79831ddd..2bf9ffdd 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -167,10 +167,11 @@ jobs: - name: Start appium working-directory: TestsAutomation - run: | + run: | + # CONFIG_CONTENT=$(cat ./config.json) xvfb-run appium -a 127.0.0.1 -p 4723 --base-path /wd/hub/ \ --allow-insecure=adb_shell \ - --default-capabilities '{"appium:app": "./app-e2e.apk", "appium:espressoBuildConfig": "./TestsAutomation/config.json"}' \ + --default-capabilities '{"appium:app": "./app-e2e.apk", "appium:espressoBuildConfig": "./config.json"}' \ --shell \ --log-timestamp \ --log ./appium-server.log & From c29d8be265e6d3b48f998f1f5830f1175a586927 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Thu, 5 Feb 2026 17:44:20 +0100 Subject: [PATCH 32/38] to remove --- .github/workflows/android-emulator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 2bf9ffdd..146e59b7 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -9,7 +9,7 @@ on: api-version: required: false type: string - default: '30' + default: '29' espresso-version: description: espresso version to use required: false From 645f9db0d1d553355e0b6ce2beae5ee8d385b5ed Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Fri, 6 Feb 2026 12:19:17 +0100 Subject: [PATCH 33/38] chore: add x86 build for e2e apk --- .github/workflows/android-emulator.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 146e59b7..f426f7dc 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -159,11 +159,11 @@ jobs: run: | appium driver install espresso@${{ inputs.espresso-version }} - # - name: Download Artifact - # uses: actions/Download-artifact@v7 - # with: - # name: app-e2e.apk - # path: . + - name: Download Artifact + uses: actions/Download-artifact@v7 + with: + name: app-e2e.apk + path: .TestsAutomation/ - name: Start appium working-directory: TestsAutomation From ac97874bf21ee218e678d41db3e9a329d43ae5b3 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Fri, 6 Feb 2026 13:23:20 +0100 Subject: [PATCH 34/38] chore: test --- .github/workflows/android-emulator.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index f426f7dc..ac776b1e 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -159,11 +159,11 @@ jobs: run: | appium driver install espresso@${{ inputs.espresso-version }} - - name: Download Artifact - uses: actions/Download-artifact@v7 - with: - name: app-e2e.apk - path: .TestsAutomation/ + # - name: Download Artifact + # uses: actions/Download-artifact@v7 + # with: + # name: app-e2e.apk + # path: TestsAutomation/ - name: Start appium working-directory: TestsAutomation @@ -206,9 +206,9 @@ jobs: ################################ # DEBUG MODE ################################# - - name: Setup tmate session - if: always() - uses: mxschmitt/action-tmate@v3 + # - name: Setup tmate session + # if: always() + # uses: mxschmitt/action-tmate@v3 - name: Save Cache Android SDK if: steps.cache-android-sdk.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG From 30217db767bf78d7e8a856e741994c36bffd80a0 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Fri, 6 Feb 2026 14:34:28 +0100 Subject: [PATCH 35/38] chore: add all tests --- .github/workflows/android-emulator.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index ac776b1e..0301804d 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -27,12 +27,12 @@ jobs: matrix: suite: - 01_InitEnrollement - # - 01_InitFirstSync - # - 02_SetupWorkspaces - # - 03_SDetAlerts - # - 03_SDetAlertsFilter - # - 03_2_SDetScan - # - 30_Diagnostic + - 01_InitFirstSync + - 02_SetupWorkspaces + - 03_SDetAlerts + - 03_SDetAlertsFilter + - 03_2_SDetScan + - 30_Diagnostic fail-fast: false env: TZ: Europe/Paris From 5d3e25063df5b3e7d87dca136e66c8991b11c8fd Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Fri, 6 Feb 2026 15:25:44 +0100 Subject: [PATCH 36/38] fix: use multiple emulators with same AVDs --- .github/workflows/android-emulator.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 0301804d..f3709c50 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -124,6 +124,9 @@ jobs: wget --progress=bar:force:noscroll -O ./cltools.zip https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip echo "➡️ Uncompressing Command Line Tools" unzip -q ./cltools.zip && mv ./cmdline-tools/* . && rmdir ./cmdline-tools + echo "➡️ Deleting AVD lock files" + rm -rf $ANDROID_AVD_HOME/*/*.lock + - name: Accept Android SDK Licenses if: steps.cache-android-sdk.outputs.cache-hit != 'true' From f04d256e4e283b5485ce368f766cd91157c96e60 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Fri, 6 Feb 2026 15:27:50 +0100 Subject: [PATCH 37/38] chore: test --- .github/workflows/android-emulator.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index f3709c50..48d8dde2 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -88,7 +88,7 @@ jobs: - name: Add Android Emulator to PATH run: echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH - - name: Cache Android SDK + - name: Restore Cache Android SDK id: cache-android-sdk uses: actions/cache/restore@v5 with: @@ -99,14 +99,14 @@ jobs: ${{ env.ANDROID_HOME }}/build-tools key: android-sdk-${{ inputs.api-version }} - - name: Cache Android AVD + - name: Restore Cache Android AVD id: cache-avd uses: actions/cache/restore@v5 with: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} - - name: Cache Appium Dependencies + - name: Restore Cache Appium Dependencies id: cache-appium uses: actions/cache/restore@v5 with: @@ -214,7 +214,7 @@ jobs: # uses: mxschmitt/action-tmate@v3 - name: Save Cache Android SDK - if: steps.cache-android-sdk.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG + if: steps.cache-android-sdk.outputs.cache-hit != 'true' # && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: path: | @@ -223,14 +223,14 @@ jobs: key: android-sdk-${{ inputs.api-version }} - name: Save Cache Android AVD - if: steps.cache-avd.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG + if: steps.cache-avd.outputs.cache-hit != 'true' # && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} - name: Save Appium Cache - if: steps.cache-appium.outputs.cache-hit != 'true' && always() # REMOVE ALWAYS AFTER DEBUG + if: steps.cache-appium.outputs.cache-hit != 'true' # && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: path: TestsAutomation/node_modules From 0041ac00992156d8331fee26ed558f1b79b8e266 Mon Sep 17 00:00:00 2001 From: Qlebrun Date: Fri, 6 Feb 2026 16:44:58 +0100 Subject: [PATCH 38/38] chore: pretty --- .github/workflows/android-emulator.yml | 39 +++++++++++++------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/android-emulator.yml b/.github/workflows/android-emulator.yml index 48d8dde2..c8a5a2db 100644 --- a/.github/workflows/android-emulator.yml +++ b/.github/workflows/android-emulator.yml @@ -56,27 +56,28 @@ jobs: sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm - - uses: actions/setup-node@v6 + - name: 📦 Setup Node + uses: actions/setup-node@v6 with: node-version: 20 cache-dependency-path: src/ cache: npm - - name: Setup Python + - name: 📦 Setup Python uses: actions/setup-python@v6 with: python-version: "3.9" - - name: Setup Java + - name: 📦 Setup Java uses: actions/setup-java@v5 with: distribution: temurin java-version: '17' - - name: Gradle cache + - name: ♻️ Gradle cache uses: gradle/actions/setup-gradle@v5 - - name: Install XVFB + - name: 📦 Install XVFB run: sudo apt -y install xvfb - name: Add Android SDK to PATH @@ -88,7 +89,7 @@ jobs: - name: Add Android Emulator to PATH run: echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH - - name: Restore Cache Android SDK + - name: ♻️ Restore Cache Android SDK id: cache-android-sdk uses: actions/cache/restore@v5 with: @@ -99,21 +100,21 @@ jobs: ${{ env.ANDROID_HOME }}/build-tools key: android-sdk-${{ inputs.api-version }} - - name: Restore Cache Android AVD + - name: ♻️ Restore Cache Android AVD id: cache-avd uses: actions/cache/restore@v5 with: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} - - name: Restore Cache Appium Dependencies + - name: ♻️ Restore Cache Appium Dependencies id: cache-appium uses: actions/cache/restore@v5 with: path: TestsAutomation/node_modules key: appium-node-modules-${{ hashFiles('TestsAutomation/package-lock.json') }} - - name: Setup Command Line Tools + - name: 📦 Setup Command Line Tools # if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: | echo "➡️ Deleting default SDK setup" @@ -133,7 +134,7 @@ jobs: run: | yes | sdkmanager --licenses - - name: Install Android SDK + - name: 📦 Install Android SDK if: steps.cache-android-sdk.outputs.cache-hit != 'true' run: | sdkmanager --install "platform-tools" "platforms;android-${{ inputs.api-version }}" "system-images;android-${{ inputs.api-version }};google_apis;x86_64" "build-tools;${{ inputs.api-version }}.0.0" "emulator" @@ -142,22 +143,22 @@ jobs: if: steps.cache-avd.outputs.cache-hit != 'true' run: mkdir -p ${{ env.ANDROID_AVD_HOME }} - - name: Create Android Emulator + - name: Create AVD if: steps.cache-avd.outputs.cache-hit != 'true' run: | avdmanager create avd -n $ANDROID_DEVICE -k "system-images;android-${{ inputs.api-version }};google_apis;x86_64" --device "pixel_8" - - name: Install Node dependencies + - name: 📦 Install Node dependencies working-directory: TestsAutomation run: | npm install echo "$PWD/node_modules/.bin/" >> $GITHUB_PATH - - name: Install python packages + - name: 📦 Install python packages working-directory: TestsAutomation run: pip3 install -U -r pip_requirements.txt - - name: Install Appium dependencies + - name: 📦 Install Appium dependencies working-directory: TestsAutomation run: | appium driver install espresso@${{ inputs.espresso-version }} @@ -213,7 +214,7 @@ jobs: # if: always() # uses: mxschmitt/action-tmate@v3 - - name: Save Cache Android SDK + - name: ♻️ Save Cache Android SDK if: steps.cache-android-sdk.outputs.cache-hit != 'true' # && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: @@ -222,21 +223,21 @@ jobs: ${{ env.ANDROID_HOME }}/emulator key: android-sdk-${{ inputs.api-version }} - - name: Save Cache Android AVD + - name: ♻️ Save Cache Android AVD if: steps.cache-avd.outputs.cache-hit != 'true' # && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: path: ${{ env.ANDROID_AVD_HOME }} key: android-avd-${{ inputs.api-version }} - - name: Save Appium Cache + - name: ♻️ Save Appium Cache if: steps.cache-appium.outputs.cache-hit != 'true' # && always() # REMOVE ALWAYS AFTER DEBUG uses: actions/cache/save@v5 with: path: TestsAutomation/node_modules key: appium-node-modules-${{ hashFiles('TestsAutomation/package-lock.json') }} - - name: Upload Appium Server Logs + - name: 📋 Upload Appium Server Logs if: always() uses: actions/upload-artifact@v5 with: @@ -244,7 +245,7 @@ jobs: path: ./TestsAutomation/appium-server.log if-no-files-found: warn - - name: Upload Tests Report + - name: 📋 Upload Tests Report if: always() uses: actions/upload-artifact@v5 with: