From a8aed729daaa3683eeb45ee13baea2ccedd38aa9 Mon Sep 17 00:00:00 2001 From: buzzamus Date: Mon, 27 Apr 2026 13:53:50 -0500 Subject: [PATCH 1/4] Create instrumentation_tests.yml --- .github/workflows/instrumentation_tests.yml | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/instrumentation_tests.yml diff --git a/.github/workflows/instrumentation_tests.yml b/.github/workflows/instrumentation_tests.yml new file mode 100644 index 00000000..b51579c2 --- /dev/null +++ b/.github/workflows/instrumentation_tests.yml @@ -0,0 +1,40 @@ +name: Instrumentation tests +on: [pull_request, workflow_dispatch] +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + api-level: [ 23, 31, 35 ] + target: [ default, google_apis ] + steps: + - name: checkout + uses: actions/checkout@v4 + + - 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 + id: run_tests + uses: reactivecircus/android-emulator-runner@v2 + continue-on-error: true + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: x86_64 + profile: pixel_7_pro + script: ./gradlew :demo:connectedCheck --stacktrace + + - name: retry tests + if: steps.run_tests.outcome == 'failure' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: x86_64 + profile: pixel_7_pro + script: ./gradlew :demo:connectedCheck --stacktrace From 793f1bc0e83736ddee204c1dda1c7c40e111f638 Mon Sep 17 00:00:00 2001 From: buzzamus Date: Tue, 28 Apr 2026 09:40:40 -0500 Subject: [PATCH 2/4] Remove unsupported api runs, bypass ToS check --- .github/workflows/instrumentation_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/instrumentation_tests.yml b/.github/workflows/instrumentation_tests.yml index b51579c2..0b3b1683 100644 --- a/.github/workflows/instrumentation_tests.yml +++ b/.github/workflows/instrumentation_tests.yml @@ -6,8 +6,8 @@ jobs: strategy: fail-fast: false matrix: - api-level: [ 23, 31, 35 ] - target: [ default, google_apis ] + api-level: [ 31, 35 ] + target: [ default ] steps: - name: checkout uses: actions/checkout@v4 From 15ae52b89a184f58a76546e371e626b21c90e4f3 Mon Sep 17 00:00:00 2001 From: buzzamus Date: Tue, 28 Apr 2026 10:08:43 -0500 Subject: [PATCH 3/4] Add fix in for API 23 and google APIs --- .github/workflows/instrumentation_tests.yml | 24 ++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/instrumentation_tests.yml b/.github/workflows/instrumentation_tests.yml index 0b3b1683..c6b49b6f 100644 --- a/.github/workflows/instrumentation_tests.yml +++ b/.github/workflows/instrumentation_tests.yml @@ -7,7 +7,15 @@ jobs: fail-fast: false matrix: api-level: [ 31, 35 ] - target: [ default ] + target: [ default, google_apis ] + profile: [ pixel_7_pro ] + include: + - api-level: 23 + target: default + profile: Nexus 6 + - api-level: 23 + target: google_apis + profile: Nexus 6 steps: - name: checkout uses: actions/checkout@v4 @@ -26,8 +34,11 @@ jobs: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} arch: x86_64 - profile: pixel_7_pro - script: ./gradlew :demo:connectedCheck --stacktrace + profile: ${{ matrix.profile }} + script: | + adb shell 'echo "_ --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line' + adb shell chmod 777 /data/local/tmp/chrome-command-line + ./gradlew :demo:connectedCheck --stacktrace - name: retry tests if: steps.run_tests.outcome == 'failure' @@ -36,5 +47,8 @@ jobs: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} arch: x86_64 - profile: pixel_7_pro - script: ./gradlew :demo:connectedCheck --stacktrace + profile: ${{ matrix.profile }} + script: | + adb shell 'echo "_ --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line' + adb shell chmod 777 /data/local/tmp/chrome-command-line + ./gradlew :demo:connectedCheck --stacktrace From d85c41aeed928e426592cf81e514321e1f5bccf5 Mon Sep 17 00:00:00 2001 From: buzzamus Date: Tue, 28 Apr 2026 10:56:40 -0500 Subject: [PATCH 4/4] Remove API 23 --- .github/workflows/instrumentation_tests.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/instrumentation_tests.yml b/.github/workflows/instrumentation_tests.yml index c6b49b6f..1c5d2d9a 100644 --- a/.github/workflows/instrumentation_tests.yml +++ b/.github/workflows/instrumentation_tests.yml @@ -8,14 +8,6 @@ jobs: matrix: api-level: [ 31, 35 ] target: [ default, google_apis ] - profile: [ pixel_7_pro ] - include: - - api-level: 23 - target: default - profile: Nexus 6 - - api-level: 23 - target: google_apis - profile: Nexus 6 steps: - name: checkout uses: actions/checkout@v4 @@ -34,7 +26,7 @@ jobs: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} arch: x86_64 - profile: ${{ matrix.profile }} + profile: pixel_7_pro script: | adb shell 'echo "_ --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line' adb shell chmod 777 /data/local/tmp/chrome-command-line @@ -47,7 +39,7 @@ jobs: api-level: ${{ matrix.api-level }} target: ${{ matrix.target }} arch: x86_64 - profile: ${{ matrix.profile }} + profile: pixel_7_pro script: | adb shell 'echo "_ --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line' adb shell chmod 777 /data/local/tmp/chrome-command-line