From 2e19c6aac7aa37e3e7bccba3e20fabbc1405e040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 1 Oct 2025 12:33:45 +0200 Subject: [PATCH 01/43] fix: paths inside e2e-ios.yml --- .github/workflows/e2e-ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index c64232df8..d848d6d28 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -2,7 +2,7 @@ name: E2E iOS on: pull_request: paths: - - .github/workflows/ios-e2e.yml + - .github/workflows/e2e-ios.yml - apps/common/example/** - apple/** - src/** From 71614592e5647ac16ac19fb4814abb0e1e657b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 1 Oct 2025 12:45:17 +0200 Subject: [PATCH 02/43] chore: upgrade CI macos versions --- .github/workflows/e2e-ios.yml | 6 +++--- .github/workflows/ios-build-test.yml | 4 ++-- .github/workflows/macos-build-test.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index d848d6d28..b8f9e0ecf 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -15,14 +15,14 @@ on: jobs: test: - runs-on: macos-14 + runs-on: macos-26 timeout-minutes: 60 strategy: matrix: working-directory: [paper-example] fail-fast: false env: - DEVICE: iPhone 15 Pro + DEVICE: iPhone 17 Pro steps: - name: Checkout Git repository uses: actions/checkout@v4 @@ -30,7 +30,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '16.1' + xcode-version: '26.0.1' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index 2b7972784..bac58cc5b 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -18,7 +18,7 @@ on: jobs: build: - runs-on: macos-14 + runs-on: macos-26 strategy: matrix: working-directory: [paper-example, fabric-example] @@ -33,7 +33,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '16.1' + xcode-version: '26.0.1' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 diff --git a/.github/workflows/macos-build-test.yml b/.github/workflows/macos-build-test.yml index 2ee542a7f..188476721 100644 --- a/.github/workflows/macos-build-test.yml +++ b/.github/workflows/macos-build-test.yml @@ -18,7 +18,7 @@ on: jobs: build: if: github.repository == 'software-mansion/react-native-svg' - runs-on: macos-14 + runs-on: macos-latest strategy: matrix: working-directory: [paper-macos-example, fabric-macos-example] From 959c67da15e3176ae5bc1e0e03b96b90d90f17ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 1 Oct 2025 12:52:13 +0200 Subject: [PATCH 03/43] chore: upgrade Example macOS check workflow --- .github/workflows/macos-build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-build-test.yml b/.github/workflows/macos-build-test.yml index 188476721..aa06a65fa 100644 --- a/.github/workflows/macos-build-test.yml +++ b/.github/workflows/macos-build-test.yml @@ -18,7 +18,7 @@ on: jobs: build: if: github.repository == 'software-mansion/react-native-svg' - runs-on: macos-latest + runs-on: macos-26 strategy: matrix: working-directory: [paper-macos-example, fabric-macos-example] From 818c15b98845ac2be1e3a8c2aea312ee41a2f17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 1 Oct 2025 12:55:44 +0200 Subject: [PATCH 04/43] fix: xcode version --- .github/workflows/e2e-ios.yml | 2 +- .github/workflows/ios-build-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index b8f9e0ecf..a3ad22af2 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -30,7 +30,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '26.0.1' + xcode-version: '26.0.0' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index bac58cc5b..206759e17 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -33,7 +33,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '26.0.1' + xcode-version: '26.0.0' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 From 51100f2871dc1af5fff49edba394a50667811c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 1 Oct 2025 13:01:46 +0200 Subject: [PATCH 05/43] fix: add DEVICE env to Example iOS check workflow --- .github/workflows/ios-build-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index 206759e17..108e7fe21 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -23,6 +23,8 @@ jobs: matrix: working-directory: [paper-example, fabric-example] fail-fast: false + env: + DEVICE: iPhone 17 Pro concurrency: group: ios-${{ matrix.working-directory }}-${{ github.ref }} cancel-in-progress: true From 8cc1d6437d81def01020f63d9af746fe313246a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 1 Oct 2025 14:58:12 +0200 Subject: [PATCH 06/43] fix: use end.Device inside ios-build.yml --- .github/workflows/ios-build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index 108e7fe21..efe16472e 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -94,4 +94,4 @@ jobs: - name: Build app working-directory: apps/${{ matrix.working-directory }} - run: npx react-native run-ios --simulator="iPhone 15 Pro" --mode Debug --verbose --no-packager + run: npx react-native run-ios --simulator="${{ env.DEVICE }}" --mode Debug --verbose --no-packager From bd400888553e8e226cca939a052d868a78e77ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Thu, 2 Oct 2025 11:22:24 +0200 Subject: [PATCH 07/43] fix: update Gemfile.lock --- apps/fabric-macos-example/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/fabric-macos-example/Gemfile.lock b/apps/fabric-macos-example/Gemfile.lock index 7e969f8a0..3873bdcca 100644 --- a/apps/fabric-macos-example/Gemfile.lock +++ b/apps/fabric-macos-example/Gemfile.lock @@ -117,4 +117,4 @@ RUBY VERSION ruby 2.7.6p219 BUNDLED WITH - 2.2.3 + 2.7.2 From 3dbc8cf0e2bd62cdbfa86fcbb8f8c03633367c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Thu, 2 Oct 2025 12:01:57 +0200 Subject: [PATCH 08/43] fix: paper macos build --- apps/paper-macos-example/Gemfile | 4 ++++ apps/paper-macos-example/Gemfile.lock | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/paper-macos-example/Gemfile b/apps/paper-macos-example/Gemfile index 8d72c37a8..04ef35573 100644 --- a/apps/paper-macos-example/Gemfile +++ b/apps/paper-macos-example/Gemfile @@ -7,3 +7,7 @@ ruby ">= 2.6.10" # bound in the template on Cocoapods with next React Native release. gem 'cocoapods', '>= 1.13', '< 1.15' gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' +gem "bigdecimal" +gem "logger" +gem "benchmark" +gem "mutex_m" \ No newline at end of file diff --git a/apps/paper-macos-example/Gemfile.lock b/apps/paper-macos-example/Gemfile.lock index e4ba34087..82d32aa25 100644 --- a/apps/paper-macos-example/Gemfile.lock +++ b/apps/paper-macos-example/Gemfile.lock @@ -17,6 +17,8 @@ GEM json (>= 1.5.1) atomos (0.1.3) base64 (0.2.0) + benchmark (0.4.1) + bigdecimal (3.2.3) claide (1.1.0) cocoapods (1.14.3) addressable (~> 2.8) @@ -68,8 +70,10 @@ GEM i18n (1.14.5) concurrent-ruby (~> 1.0) json (2.7.2) + logger (1.7.0) minitest (5.24.1) molinillo (0.8.0) + mutex_m (0.3.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) @@ -96,10 +100,14 @@ PLATFORMS DEPENDENCIES activesupport (>= 6.1.7.5, < 7.1.0) + benchmark + bigdecimal cocoapods (>= 1.13, < 1.15) + logger + mutex_m RUBY VERSION ruby 2.7.2p137 BUNDLED WITH - 2.5.22 + 2.7.2 From a6e9e3752266e73f023cc26a10c8ac5517efe755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Mon, 6 Oct 2025 14:03:23 +0200 Subject: [PATCH 09/43] fix: add proper xcode version --- .github/workflows/e2e-ios.yml | 2 +- .github/workflows/ios-build-test.yml | 2 +- .github/workflows/macos-build-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index a3ad22af2..b8f9e0ecf 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -30,7 +30,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '26.0.0' + xcode-version: '26.0.1' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index efe16472e..69c58498e 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -35,7 +35,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '26.0.0' + xcode-version: '26.0.1' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 diff --git a/.github/workflows/macos-build-test.yml b/.github/workflows/macos-build-test.yml index aa06a65fa..253e43a7e 100644 --- a/.github/workflows/macos-build-test.yml +++ b/.github/workflows/macos-build-test.yml @@ -33,7 +33,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: latest-stable + xcode-version: '26.0.1' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 From df1958bb28e8984fa68cde634f857d0bfc5b6226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Mon, 6 Oct 2025 14:54:57 +0200 Subject: [PATCH 10/43] fix: upgrade macos for E2E android workflow --- .github/workflows/e2e-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 2872c9921..12ab98296 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -14,7 +14,7 @@ on: workflow_dispatch: jobs: test: - runs-on: macos-12 + runs-on: macos-14 timeout-minutes: 60 env: WORKING_DIRECTORY: paper-example From 16cb0a39a60e253fc8d470f15401d8e6ab1afe73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Mon, 6 Oct 2025 15:44:16 +0200 Subject: [PATCH 11/43] fix: use proper setup-java inside E2E android --- .github/workflows/e2e-android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 12ab98296..aed60d042 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -14,7 +14,7 @@ on: workflow_dispatch: jobs: test: - runs-on: macos-14 + runs-on: macos-26 timeout-minutes: 60 env: WORKING_DIRECTORY: paper-example @@ -34,7 +34,7 @@ jobs: node-version: 18 cache: 'yarn' - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: '17' distribution: 'zulu' From be477567db2410e978e21cddb682480b48a441a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Mon, 6 Oct 2025 15:55:34 +0200 Subject: [PATCH 12/43] fix: upgrade system images --- .github/workflows/e2e-android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index aed60d042..09d683bde 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -19,7 +19,7 @@ jobs: env: WORKING_DIRECTORY: paper-example API_LEVEL: 34 - SYSTEM_IMAGES: system-images;android-34;google_apis;x86_64 + SYSTEM_IMAGES: system-images;android-34;google_apis;arm64-v8a AVD_NAME: rn-svg-avd concurrency: group: android-e2e-example-${{ github.ref }} @@ -55,7 +55,7 @@ jobs: key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} - name: SKDs - download required images if: ${{ steps.cache-sdd-img.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" + run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;arm64-v8a" - name: Cache AVD id: cache-avd uses: actions/cache@v3 From b883be0e35cd932592683d396dc7f8d030717239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Mon, 6 Oct 2025 16:32:34 +0200 Subject: [PATCH 13/43] fix: E2E test Emulator run --- .github/workflows/e2e-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 09d683bde..a0062b50c 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -64,7 +64,7 @@ jobs: key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} - name: Emulator - Create if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 --package "${{ env.SYSTEM_IMAGES }}" --sdcard 512M + run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 -k "${{ env.SYSTEM_IMAGES }}" --sdcard 512M - name: Emulator - Set screen settings if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} run: | From 9105da63746f748f1b21e6cd55d4650693e1bdd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Mon, 6 Oct 2025 16:48:47 +0200 Subject: [PATCH 14/43] fix: use actions/cache@v4 --- .github/workflows/e2e-android.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index a0062b50c..aebf3766e 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -19,7 +19,7 @@ jobs: env: WORKING_DIRECTORY: paper-example API_LEVEL: 34 - SYSTEM_IMAGES: system-images;android-34;google_apis;arm64-v8a + SYSTEM_IMAGES: system-images;android-34;google_apis;x86_64 AVD_NAME: rn-svg-avd concurrency: group: android-e2e-example-${{ github.ref }} @@ -49,22 +49,22 @@ jobs: run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV - name: Cache SDK image id: cache-sdk-img - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: $ANDROID_HOME/system-images/ key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} - name: SKDs - download required images if: ${{ steps.cache-sdd-img.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;arm64-v8a" + run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" - name: Cache AVD id: cache-avd - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.android/avd/${{ env.AVD_NAME }}.avd key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} - name: Emulator - Create if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 -k "${{ env.SYSTEM_IMAGES }}" --sdcard 512M + run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 --package "${{ env.SYSTEM_IMAGES }}" --sdcard 512M - name: Emulator - Set screen settings if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} run: | From 8676073ffb264f7e57ddb8fbdf0b44fa838264da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 08:14:36 +0200 Subject: [PATCH 15/43] fix: upgrade E2E android workflow --- .github/workflows/e2e-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index aebf3766e..7f380f05e 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -14,7 +14,7 @@ on: workflow_dispatch: jobs: test: - runs-on: macos-26 + runs-on: macos-latest-large timeout-minutes: 60 env: WORKING_DIRECTORY: paper-example From dfb8ac7bf9ff2dd339e2fd46c890c6f898b6985a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 08:33:57 +0200 Subject: [PATCH 16/43] fix: use macos-latest --- .github/workflows/e2e-ios.yml | 2 +- .github/workflows/ios-build-test.yml | 2 +- .github/workflows/macos-build-test.yml | 2 +- apps/paper-example/Gemfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index b8f9e0ecf..06e5b8d35 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -15,7 +15,7 @@ on: jobs: test: - runs-on: macos-26 + runs-on: macos-latest timeout-minutes: 60 strategy: matrix: diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index 69c58498e..fc31422bb 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -18,7 +18,7 @@ on: jobs: build: - runs-on: macos-26 + runs-on: macos-latest strategy: matrix: working-directory: [paper-example, fabric-example] diff --git a/.github/workflows/macos-build-test.yml b/.github/workflows/macos-build-test.yml index 253e43a7e..c33796565 100644 --- a/.github/workflows/macos-build-test.yml +++ b/.github/workflows/macos-build-test.yml @@ -18,7 +18,7 @@ on: jobs: build: if: github.repository == 'software-mansion/react-native-svg' - runs-on: macos-26 + runs-on: macos-latest strategy: matrix: working-directory: [paper-macos-example, fabric-macos-example] diff --git a/apps/paper-example/Gemfile b/apps/paper-example/Gemfile index 1ddcc8fab..60770b186 100644 --- a/apps/paper-example/Gemfile +++ b/apps/paper-example/Gemfile @@ -13,4 +13,4 @@ gem 'concurrent-ruby', '< 1.3.4' gem 'bigdecimal' gem 'logger' gem 'benchmark' -gem 'mutex_m' \ No newline at end of file +gem 'mutex_m' From 813532b83a9a63d6162d26c51fca5eaa265e8b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:05:40 +0200 Subject: [PATCH 17/43] fix: use ubuntu-latest for E2E android --- .github/workflows/e2e-android.yml | 72 ++++++++++++------------------- 1 file changed, 27 insertions(+), 45 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 7f380f05e..791e632e0 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -14,7 +14,7 @@ on: workflow_dispatch: jobs: test: - runs-on: macos-latest-large + runs-on: ubuntu-latest timeout-minutes: 60 env: WORKING_DIRECTORY: paper-example @@ -25,59 +25,35 @@ jobs: group: android-e2e-example-${{ github.ref }} cancel-in-progress: true steps: - - name: checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/setup-node@v3 + + - name: Set up Node + uses: actions/setup-node@v4 with: node-version: 18 cache: 'yarn' + - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'zulu' cache: 'gradle' - - name: Install NDK - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: r26d - local-cache: true - - name: Set ANDROID_NDK - run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV - - name: Cache SDK image - id: cache-sdk-img - uses: actions/cache@v4 - with: - path: $ANDROID_HOME/system-images/ - key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} - - name: SKDs - download required images - if: ${{ steps.cache-sdd-img.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" - - name: Cache AVD - id: cache-avd - uses: actions/cache@v4 - with: - path: ~/.android/avd/${{ env.AVD_NAME }}.avd - key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} - - name: Emulator - Create - if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 --package "${{ env.SYSTEM_IMAGES }}" --sdcard 512M - - name: Emulator - Set screen settings - if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} + + - name: Install Android SDK components run: | - echo "AVD config path: $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini" - sed -i '' 's/.*hw\.lcd\.density.*/hw\.lcd\.density = 480/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini - sed -i '' 's/.*hw\.lcd\.width.*/hw\.lcd\.width = 1344/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini - sed -i '' 's/.*hw\.lcd\.height.*/hw\.lcd\.height = 2992/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini - - name: Emulator - Boot - run: $ANDROID_HOME/emulator/emulator -memory 4096 -avd ${{ env.AVD_NAME }} -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim & + sdkmanager --install "platform-tools" "platforms;android-${API_LEVEL}" "system-images;android-${API_LEVEL};google_apis;x86_64" "emulator" - - name: ADB Wait For Device - run: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' - timeout-minutes: 10 + - name: Create and start emulator + run: | + echo "no" | avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6" + $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-snapshot -noaudio -no-window -gpu swiftshader_indirect -no-boot-anim & + adb wait-for-device + adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' + echo "Emulator booted successfully." - name: Reverse TCP working-directory: apps/${{ env.WORKING_DIRECTORY }} @@ -87,8 +63,8 @@ jobs: run: yarn - name: Install example app node dependencies - run: yarn working-directory: apps/${{ env.WORKING_DIRECTORY }} + run: yarn - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android @@ -102,9 +78,15 @@ jobs: run: adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk - name: Launch APK - run: 'while ! (adb shell monkey -p com.example 1 | grep -q "Events injected: 1"); do sleep 1; echo "Retrying due to errors in previous run..."; done' + run: | + PACKAGE="com.example" + ACTIVITY=".MainActivity" + echo "Launching $PACKAGE/$ACTIVITY..." + adb shell am start -n "$PACKAGE/$ACTIVITY" + adb shell 'until pidof com.example > /dev/null; do sleep 1; done' + echo "App started." - - name: Run e2e Tests + - name: Run E2E Tests run: E2E=true yarn e2e - name: Upload test report From cbbd94ee0dfa971337705f923458552b2b4628fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:09:08 +0200 Subject: [PATCH 18/43] fix: android sdk installation --- .github/workflows/e2e-android.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 791e632e0..cdb9ffa00 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -45,7 +45,11 @@ jobs: - name: Install Android SDK components run: | - sdkmanager --install "platform-tools" "platforms;android-${API_LEVEL}" "system-images;android-${API_LEVEL};google_apis;x86_64" "emulator" + yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install \ + "platform-tools" \ + "platforms;android-${API_LEVEL}" \ + "system-images;android-${API_LEVEL};google_apis;x86_64" \ + "emulator" - name: Create and start emulator run: | From 33a1a822c550d7c696505f5286323fdabcf3bcd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:11:39 +0200 Subject: [PATCH 19/43] fix: creating avd --- .github/workflows/e2e-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index cdb9ffa00..8891ed6b5 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -53,7 +53,7 @@ jobs: - name: Create and start emulator run: | - echo "no" | avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6" + echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6" $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-snapshot -noaudio -no-window -gpu swiftshader_indirect -no-boot-anim & adb wait-for-device adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' From ab0f414633cb2d1cdf05bd65f57ba14f73ef45d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:26:05 +0200 Subject: [PATCH 20/43] fix: starting emulator --- apps/common/example/examples/Empty.tsx | 60 +++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/apps/common/example/examples/Empty.tsx b/apps/common/example/examples/Empty.tsx index cb915c0ed..93cbbf64d 100644 --- a/apps/common/example/examples/Empty.tsx +++ b/apps/common/example/examples/Empty.tsx @@ -1,8 +1,42 @@ import React from 'react'; -import {Rect, Svg} from 'react-native-svg'; +import { + SafeAreaView, + ScrollView, + StatusBar, + StyleSheet, + Text, + useColorScheme, + View, +} from 'react-native'; +import {Defs, Path, Pattern, Rect, Svg, SvgProps} from 'react-native-svg'; function EmptyExample() { - return ; + const isDarkMode = useColorScheme() === 'dark'; + + const backgroundStyle = { + backgroundColor: 'gray', + }; + + return ( + + + + + + + + + + + ); } EmptyExample.title = ''; @@ -14,3 +48,25 @@ const icon = ( const samples = [EmptyExample]; export {icon, samples}; + +const TestIcon = (props: SvgProps) => ( + + + + + + + + +); + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + }, +}); From 521bab090ffb413d1446020889630207bf2532cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:29:04 +0200 Subject: [PATCH 21/43] fix: adb path --- .github/workflows/e2e-android.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 8891ed6b5..1edafd148 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -51,17 +51,19 @@ jobs: "system-images;android-${API_LEVEL};google_apis;x86_64" \ "emulator" - - name: Create and start emulator + - name: Create emulator + run: echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6" + + - name: Boot emulator run: | - echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6" - $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-snapshot -noaudio -no-window -gpu swiftshader_indirect -no-boot-anim & - adb wait-for-device - adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' + $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim & + $ANDROID_HOME/platform-tools/adb wait-for-device + $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' echo "Emulator booted successfully." - name: Reverse TCP working-directory: apps/${{ env.WORKING_DIRECTORY }} - run: adb devices | grep '\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} adb -s {} reverse tcp:8081 tcp:8081 + run: $ANDROID_HOME/platform-tools/adb devices | grep '\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} reverse tcp:8081 tcp:8081 - name: Install root node dependencies run: yarn @@ -79,15 +81,15 @@ jobs: run: E2E=true yarn start &> output.log & - name: Install APK - run: adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk + run: $ANDROID_HOME/platform-tools/adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk - name: Launch APK run: | PACKAGE="com.example" ACTIVITY=".MainActivity" echo "Launching $PACKAGE/$ACTIVITY..." - adb shell am start -n "$PACKAGE/$ACTIVITY" - adb shell 'until pidof com.example > /dev/null; do sleep 1; done' + $ANDROID_HOME/platform-tools/adb shell am start -n "$PACKAGE/$ACTIVITY" + $ANDROID_HOME/platform-tools/adb shell 'until pidof com.example > /dev/null; do sleep 1; done' echo "App started." - name: Run E2E Tests From 49756615d48a090116554f4548b087fe60f1aec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:36:44 +0200 Subject: [PATCH 22/43] fix: avd creation --- .github/workflows/e2e-android.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 1edafd148..75185a355 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -56,6 +56,7 @@ jobs: - name: Boot emulator run: | + export ANDROID_AVD_HOME=$HOME/.android/avd $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim & $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' From 1a8b22d0766112b938fe6bf10574e1b9f4dc193d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:47:11 +0200 Subject: [PATCH 23/43] fix: e2e android CI --- .github/workflows/e2e-android.yml | 66 +++++++++++++++++++------------ 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 75185a355..a7a706f82 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -25,42 +25,58 @@ jobs: group: android-e2e-example-${{ github.ref }} cancel-in-progress: true steps: - - name: Checkout - uses: actions/checkout@v4 + - name: checkout + uses: actions/checkout@v3 with: submodules: recursive - - - name: Set up Node - uses: actions/setup-node@v4 + - uses: actions/setup-node@v3 with: node-version: 18 cache: 'yarn' - - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v3 with: java-version: '17' distribution: 'zulu' cache: 'gradle' - - - name: Install Android SDK components - run: | - yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install \ - "platform-tools" \ - "platforms;android-${API_LEVEL}" \ - "system-images;android-${API_LEVEL};google_apis;x86_64" \ - "emulator" - - - name: Create emulator - run: echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6" - - - name: Boot emulator + - name: Install NDK + uses: nttld/setup-ndk@v1 + id: setup-ndk + with: + ndk-version: r26d + local-cache: true + - name: Set ANDROID_NDK + run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV + - name: Cache SDK image + id: cache-sdk-img + uses: actions/cache@v3 + with: + path: $ANDROID_HOME/system-images/ + key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} + - name: SKDs - download required images + if: ${{ steps.cache-sdd-img.outputs.cache-hit != 'true' }} + run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" + - name: Cache AVD + id: cache-avd + uses: actions/cache@v3 + with: + path: ~/.android/avd/${{ env.AVD_NAME }}.avd + key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} + - name: Emulator - Create + if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} + run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 --package "${{ env.SYSTEM_IMAGES }}" --sdcard 512M + - name: Emulator - Set screen settings + if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} run: | - export ANDROID_AVD_HOME=$HOME/.android/avd - $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim & - $ANDROID_HOME/platform-tools/adb wait-for-device - $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' - echo "Emulator booted successfully." + echo "AVD config path: $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini" + sed -i 's/.*hw\.lcd\.density.*/hw\.lcd\.density = 480/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini + sed -i 's/.*hw\.lcd\.width.*/hw\.lcd\.width = 1344/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini + sed -i 's/.*hw\.lcd\.height.*/hw\.lcd\.height = 2992/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini + - name: Emulator - Boot + run: $ANDROID_HOME/emulator/emulator -memory 4096 -avd ${{ env.AVD_NAME }} -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim & + - name: ADB Wait For Device + run: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' + timeout-minutes: 10 - name: Reverse TCP working-directory: apps/${{ env.WORKING_DIRECTORY }} From 763f21e04ec33f3c6f57ff1902e2e53566d0748a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 10:56:42 +0200 Subject: [PATCH 24/43] fix: typo --- .github/workflows/e2e-android.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index a7a706f82..7f035f533 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -54,7 +54,7 @@ jobs: path: $ANDROID_HOME/system-images/ key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} - name: SKDs - download required images - if: ${{ steps.cache-sdd-img.outputs.cache-hit != 'true' }} + if: ${{ steps.cache-sdk-img.outputs.cache-hit != 'true' }} run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" - name: Cache AVD id: cache-avd @@ -64,7 +64,9 @@ jobs: key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} - name: Emulator - Create if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 --package "${{ env.SYSTEM_IMAGES }}" --sdcard 512M + run: | + echo $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager list devices + $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device "pixel_2" -k "${{ env.SYSTEM_IMAGES }}" --sdcard 512M - name: Emulator - Set screen settings if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} run: | From e6a376754c8876aa16a03a473127dec076c8a4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 11:13:03 +0200 Subject: [PATCH 25/43] fix: use setup-java v4 --- .github/workflows/e2e-android.yml | 160 +++++++++++++++++------------- 1 file changed, 93 insertions(+), 67 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 7f035f533..552bba746 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -25,64 +25,27 @@ jobs: group: android-e2e-example-${{ github.ref }} cancel-in-progress: true steps: - - name: checkout - uses: actions/checkout@v3 - with: - submodules: recursive - - uses: actions/setup-node@v3 + - name: Checkout + uses: actions/checkout@v4 + + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main with: - node-version: 18 - cache: 'yarn' + tool-cache: true + android: false + - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'zulu' cache: 'gradle' - - name: Install NDK - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: r26d - local-cache: true - - name: Set ANDROID_NDK - run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV - - name: Cache SDK image - id: cache-sdk-img - uses: actions/cache@v3 - with: - path: $ANDROID_HOME/system-images/ - key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} - - name: SKDs - download required images - if: ${{ steps.cache-sdk-img.outputs.cache-hit != 'true' }} - run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" - - name: Cache AVD - id: cache-avd - uses: actions/cache@v3 + + - name: Setup Node.js (version from .nvmrc) + uses: actions/setup-node@v4 with: - path: ~/.android/avd/${{ env.AVD_NAME }}.avd - key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} - - name: Emulator - Create - if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} - run: | - echo $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager list devices - $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device "pixel_2" -k "${{ env.SYSTEM_IMAGES }}" --sdcard 512M - - name: Emulator - Set screen settings - if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} - run: | - echo "AVD config path: $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini" - sed -i 's/.*hw\.lcd\.density.*/hw\.lcd\.density = 480/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini - sed -i 's/.*hw\.lcd\.width.*/hw\.lcd\.width = 1344/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini - sed -i 's/.*hw\.lcd\.height.*/hw\.lcd\.height = 2992/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini - - name: Emulator - Boot - run: $ANDROID_HOME/emulator/emulator -memory 4096 -avd ${{ env.AVD_NAME }} -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim & - - name: ADB Wait For Device - run: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' - timeout-minutes: 10 - - - name: Reverse TCP - working-directory: apps/${{ env.WORKING_DIRECTORY }} - run: $ANDROID_HOME/platform-tools/adb devices | grep '\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} reverse tcp:8081 tcp:8081 + node-version-file: '.nvmrc' + cache: 'yarn' - name: Install root node dependencies run: yarn @@ -91,28 +54,91 @@ jobs: working-directory: apps/${{ env.WORKING_DIRECTORY }} run: yarn + - name: Install AVD dependencies + # libxkbfile1 is removed by "Free Disk Space (Ubuntu)" step first. Here we install it again + # as it seems to be needed by the emulator. + run: | + sudo apt update + sudo apt-get install -y libpulse0 libgl1 libxkbfile1 + - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android run: ./gradlew assembleDebug - - name: Start Metro server - working-directory: apps/${{ env.WORKING_DIRECTORY }} - run: E2E=true yarn start &> output.log & + - 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: Install APK - run: $ANDROID_HOME/platform-tools/adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk + - name: AVD cache + uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-${{ env.API_LEVEL }} - - name: Launch APK - run: | - PACKAGE="com.example" - ACTIVITY=".MainActivity" - echo "Launching $PACKAGE/$ACTIVITY..." - $ANDROID_HOME/platform-tools/adb shell am start -n "$PACKAGE/$ACTIVITY" - $ANDROID_HOME/platform-tools/adb shell 'until pidof com.example > /dev/null; do sleep 1; done' - echo "App started." - - - name: Run E2E Tests - run: E2E=true yarn e2e + - 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: ${{ env.API_LEVEL }} + target: default + profile: pixel_2 + ram-size: '4096M' + disk-size: '10G' + disable-animations: false + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + avd-name: e2e_emulator + arch: x86_64 + script: echo "Generated AVD snapshot for caching." + + - name: Run emulator, Metro, and E2E + uses: reactivecircus/android-emulator-runner@v2 + with: + working-directory: ${{ env.WORKING_DIRECTORY }} + api-level: ${{ env.API_LEVEL }} + target: default + profile: pixel_2 + ram-size: '4096M' + disk-size: '10G' + disable-animations: false + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + avd-name: e2e_emulator + arch: x86_64 + script: | + # Start Metro in the background + E2E=true yarn start &> output.log & + # Wait for emulator to boot fully + $ANDROID_HOME/platform-tools/adb wait-for-device + $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' + # Install the app APK + adb install -r android/app/build/outputs/apk/debug/app-debug.apk + # Run your E2E tests + E2E=true yarn e2e + + # - name: Start Metro server + # working-directory: apps/${{ env.WORKING_DIRECTORY }} + # run: E2E=true yarn start &> output.log & + + # - name: Install APK + # run: $ANDROID_HOME/platform-tools/adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk + + # - name: Launch APK + # run: | + # PACKAGE="com.example" + # ACTIVITY=".MainActivity" + # echo "Launching $PACKAGE/$ACTIVITY..." + # $ANDROID_HOME/platform-tools/adb shell am start -n "$PACKAGE/$ACTIVITY" + # $ANDROID_HOME/platform-tools/adb shell 'until pidof com.example > /dev/null; do sleep 1; done' + # echo "App started." + + # - name: Run E2E Tests + # run: E2E=true yarn e2e - name: Upload test report uses: actions/upload-artifact@v4 From f5b2e68d043e4ed8846987bea1daa33a87fa72fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 11:27:17 +0200 Subject: [PATCH 26/43] fix: node version --- .github/workflows/e2e-android.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 552bba746..30c39dcef 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -28,11 +28,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: true - android: false + # - name: Free Disk Space (Ubuntu) + # uses: jlumbroso/free-disk-space@main + # with: + # tool-cache: true + # android: false - name: Set up JDK 17 uses: actions/setup-java@v4 @@ -41,10 +41,10 @@ jobs: distribution: 'zulu' cache: 'gradle' - - name: Setup Node.js (version from .nvmrc) - uses: actions/setup-node@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 with: - node-version-file: '.nvmrc' + node-version: 18 cache: 'yarn' - name: Install root node dependencies From baae09c6dd073adb59cf5d3e50836e2fe76f16d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 11:39:32 +0200 Subject: [PATCH 27/43] fix: change emulator size --- .github/workflows/e2e-android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 30c39dcef..14c25c85f 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -88,7 +88,7 @@ jobs: target: default profile: pixel_2 ram-size: '4096M' - disk-size: '10G' + disk-size: '5G' disable-animations: false force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none @@ -104,7 +104,7 @@ jobs: target: default profile: pixel_2 ram-size: '4096M' - disk-size: '10G' + disk-size: '5G' disable-animations: false force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none From 7216d1a3f51608aa23d18131879a3e584f82d953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 11:53:18 +0200 Subject: [PATCH 28/43] fix: working directory --- .github/workflows/e2e-android.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 14c25c85f..cd1ad1abb 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -61,9 +61,9 @@ jobs: sudo apt update sudo apt-get install -y libpulse0 libgl1 libxkbfile1 - - name: Build Android app - working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: ./gradlew assembleDebug + # - name: Build Android app + # working-directory: apps/${{ env.WORKING_DIRECTORY }}/android + # run: ./gradlew assembleDebug - name: Enable KVM run: | @@ -99,7 +99,7 @@ jobs: - name: Run emulator, Metro, and E2E uses: reactivecircus/android-emulator-runner@v2 with: - working-directory: ${{ env.WORKING_DIRECTORY }} + working-directory: apps/${{ env.WORKING_DIRECTORY }} api-level: ${{ env.API_LEVEL }} target: default profile: pixel_2 @@ -147,6 +147,3 @@ jobs: path: | report.html jest-html-reporters-attach/ - - - name: Kill emulator (so it can be cached safely) - run: adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done From 3f29fc65a59619c0e336cb56d8ca34290cf55abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 11:58:11 +0200 Subject: [PATCH 29/43] fix: adb install --- .github/workflows/e2e-android.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index cd1ad1abb..1789d0943 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -61,9 +61,9 @@ jobs: sudo apt update sudo apt-get install -y libpulse0 libgl1 libxkbfile1 - # - name: Build Android app - # working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - # run: ./gradlew assembleDebug + - name: Build Android app + working-directory: apps/${{ env.WORKING_DIRECTORY }}/android + run: ./gradlew assembleDebug - name: Enable KVM run: | @@ -117,7 +117,7 @@ jobs: $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' # Install the app APK - adb install -r android/app/build/outputs/apk/debug/app-debug.apk + $ANDROID_HOME/platform-tools/adb install -r android/app/build/outputs/apk/debug/app-debug.apk # Run your E2E tests E2E=true yarn e2e From 6ee8f6c74635ac4f39e6b93016a41f10361aaef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 12:17:25 +0200 Subject: [PATCH 30/43] fix: e2e start --- .github/workflows/e2e-android.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 1789d0943..abbcc9ad9 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -118,7 +118,13 @@ jobs: $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' # Install the app APK $ANDROID_HOME/platform-tools/adb install -r android/app/build/outputs/apk/debug/app-debug.apk + # Launch the app + until $ANDROID_HOME/platform-tools/adb shell monkey -p com.example 1 | grep -q "Events injected: 1"; do + sleep 1 + echo "Retrying app launch..." + done # Run your E2E tests + cd ../.. E2E=true yarn e2e # - name: Start Metro server From 3096815465ae1076ade585438fa9eefa4c8b7cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 12:38:17 +0200 Subject: [PATCH 31/43] fix: app launch --- .github/workflows/e2e-android.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index abbcc9ad9..c15f1d79e 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -118,11 +118,9 @@ jobs: $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' # Install the app APK $ANDROID_HOME/platform-tools/adb install -r android/app/build/outputs/apk/debug/app-debug.apk - # Launch the app - until $ANDROID_HOME/platform-tools/adb shell monkey -p com.example 1 | grep -q "Events injected: 1"; do - sleep 1 - echo "Retrying app launch..." - done + # Launch the app using bash + bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.example 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' + # Run your E2E tests cd ../.. E2E=true yarn e2e From f891a03c3f7a441326ee5db970fb3ed9c638249e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 12:55:02 +0200 Subject: [PATCH 32/43] fix: use proper app id --- .github/workflows/e2e-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index c15f1d79e..32eeb41fd 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -119,7 +119,7 @@ jobs: # Install the app APK $ANDROID_HOME/platform-tools/adb install -r android/app/build/outputs/apk/debug/app-debug.apk # Launch the app using bash - bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.example 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' + bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' # Run your E2E tests cd ../.. From a8f0ee5e4d72a380deec92b390075bbe385eb344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 13:21:48 +0200 Subject: [PATCH 33/43] fix: run emulator --- .github/workflows/e2e-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 32eeb41fd..2832dfe04 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -99,7 +99,6 @@ jobs: - name: Run emulator, Metro, and E2E uses: reactivecircus/android-emulator-runner@v2 with: - working-directory: apps/${{ env.WORKING_DIRECTORY }} api-level: ${{ env.API_LEVEL }} target: default profile: pixel_2 @@ -111,6 +110,7 @@ jobs: avd-name: e2e_emulator arch: x86_64 script: | + cd apps/${{ env.WORKING_DIRECTORY }} # Start Metro in the background E2E=true yarn start &> output.log & # Wait for emulator to boot fully From d659e07bee2f8a281195ad5eb841b1d90374d572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 13:41:48 +0200 Subject: [PATCH 34/43] fix: metro start --- .github/workflows/e2e-android.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 2832dfe04..653560c2d 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -110,19 +110,17 @@ jobs: avd-name: e2e_emulator arch: x86_64 script: | - cd apps/${{ env.WORKING_DIRECTORY }} # Start Metro in the background - E2E=true yarn start &> output.log & + E2E=true yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & # Wait for emulator to boot fully $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' # Install the app APK - $ANDROID_HOME/platform-tools/adb install -r android/app/build/outputs/apk/debug/app-debug.apk + $ANDROID_HOME/platform-tools/adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk # Launch the app using bash bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' # Run your E2E tests - cd ../.. E2E=true yarn e2e # - name: Start Metro server From 08624e20250d06b000c2cb6d030551c92cc97472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 14:16:29 +0200 Subject: [PATCH 35/43] fix: setting E2E env --- .github/workflows/e2e-android.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 653560c2d..d83d2c6f9 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -63,7 +63,9 @@ jobs: - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: ./gradlew assembleDebug + run: | + export E2E=true + ./gradlew assembleDebug - name: Enable KVM run: | @@ -111,7 +113,7 @@ jobs: arch: x86_64 script: | # Start Metro in the background - E2E=true yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & + yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & # Wait for emulator to boot fully $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' @@ -121,7 +123,7 @@ jobs: bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' # Run your E2E tests - E2E=true yarn e2e + yarn e2e # - name: Start Metro server # working-directory: apps/${{ env.WORKING_DIRECTORY }} From 5a5457a1b14515d247f5624a7758a6e767b3bdf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 14:50:26 +0200 Subject: [PATCH 36/43] fix: e2e setting --- .github/workflows/e2e-android.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index d83d2c6f9..7d8a1e2f0 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -21,6 +21,7 @@ jobs: API_LEVEL: 34 SYSTEM_IMAGES: system-images;android-34;google_apis;x86_64 AVD_NAME: rn-svg-avd + E2E: true concurrency: group: android-e2e-example-${{ github.ref }} cancel-in-progress: true @@ -63,9 +64,7 @@ jobs: - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: | - export E2E=true - ./gradlew assembleDebug + run: ./gradlew assembleDebug - name: Enable KVM run: | From 9a7b926a2c3e0c76c08f6ce718d2b3cd281f947a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 15:09:35 +0200 Subject: [PATCH 37/43] fix: setting E2E env var --- .github/workflows/e2e-android.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 7d8a1e2f0..cc94ebb35 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -21,7 +21,6 @@ jobs: API_LEVEL: 34 SYSTEM_IMAGES: system-images;android-34;google_apis;x86_64 AVD_NAME: rn-svg-avd - E2E: true concurrency: group: android-e2e-example-${{ github.ref }} cancel-in-progress: true @@ -64,7 +63,7 @@ jobs: - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: ./gradlew assembleDebug + run: E2E=true ./gradlew assembleDebug - name: Enable KVM run: | @@ -112,7 +111,7 @@ jobs: arch: x86_64 script: | # Start Metro in the background - yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & + E2E=true yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & # Wait for emulator to boot fully $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' @@ -122,7 +121,7 @@ jobs: bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' # Run your E2E tests - yarn e2e + E2E=true yarn e2e # - name: Start Metro server # working-directory: apps/${{ env.WORKING_DIRECTORY }} From 5851d0b4d70ff1a3ce56e7085a8c378416ca05b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 15:29:42 +0200 Subject: [PATCH 38/43] fix: setting E2E env var by export --- .github/workflows/e2e-android.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index cc94ebb35..96cec381b 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -63,7 +63,9 @@ jobs: - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: E2E=true ./gradlew assembleDebug + run: | + export E2E=true + ./gradlew assembleDebug - name: Enable KVM run: | @@ -111,7 +113,8 @@ jobs: arch: x86_64 script: | # Start Metro in the background - E2E=true yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & + export E2E=true + yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & # Wait for emulator to boot fully $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' @@ -121,7 +124,8 @@ jobs: bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' # Run your E2E tests - E2E=true yarn e2e + export E2E=true + yarn e2e # - name: Start Metro server # working-directory: apps/${{ env.WORKING_DIRECTORY }} From ecc569016278fb4af88e62f4fa5b27144151660a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 16:04:05 +0200 Subject: [PATCH 39/43] fix: set env in github_env --- .github/workflows/e2e-android.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 96cec381b..c5a0265d8 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -34,6 +34,9 @@ jobs: # tool-cache: true # android: false + - name: Set E2E env for workflow + run: echo "E2E=true" >> $GITHUB_ENV + - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -63,9 +66,7 @@ jobs: - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: | - export E2E=true - ./gradlew assembleDebug + run: ./gradlew assembleDebug - name: Enable KVM run: | @@ -113,7 +114,6 @@ jobs: arch: x86_64 script: | # Start Metro in the background - export E2E=true yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & # Wait for emulator to boot fully $ANDROID_HOME/platform-tools/adb wait-for-device @@ -124,7 +124,6 @@ jobs: bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' # Run your E2E tests - export E2E=true yarn e2e # - name: Start Metro server From bac460b916c57c50c13da8439d884aad92af742d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Tue, 7 Oct 2025 16:45:17 +0200 Subject: [PATCH 40/43] fix: run script in single bash --- .github/workflows/e2e-android.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index c5a0265d8..cc94ebb35 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -34,9 +34,6 @@ jobs: # tool-cache: true # android: false - - name: Set E2E env for workflow - run: echo "E2E=true" >> $GITHUB_ENV - - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -66,7 +63,7 @@ jobs: - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: ./gradlew assembleDebug + run: E2E=true ./gradlew assembleDebug - name: Enable KVM run: | @@ -114,7 +111,7 @@ jobs: arch: x86_64 script: | # Start Metro in the background - yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & + E2E=true yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & # Wait for emulator to boot fully $ANDROID_HOME/platform-tools/adb wait-for-device $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' @@ -124,7 +121,7 @@ jobs: bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' # Run your E2E tests - yarn e2e + E2E=true yarn e2e # - name: Start Metro server # working-directory: apps/${{ env.WORKING_DIRECTORY }} From cff2e59db9af117adbb33e9881b6b08e2969a13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 8 Oct 2025 07:52:48 +0200 Subject: [PATCH 41/43] fix: e2e-android.yml --- .github/workflows/e2e-android.yml | 164 ++++++++++--------------- apps/common/example/examples/Empty.tsx | 60 +-------- 2 files changed, 68 insertions(+), 156 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index cc94ebb35..2872c9921 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -14,7 +14,7 @@ on: workflow_dispatch: jobs: test: - runs-on: ubuntu-latest + runs-on: macos-12 timeout-minutes: 60 env: WORKING_DIRECTORY: paper-example @@ -25,122 +25,87 @@ jobs: group: android-e2e-example-${{ github.ref }} cancel-in-progress: true steps: - - name: Checkout - uses: actions/checkout@v4 - - # - name: Free Disk Space (Ubuntu) - # uses: jlumbroso/free-disk-space@main - # with: - # tool-cache: true - # android: false - + - name: checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'yarn' - name: Set up JDK 17 - uses: actions/setup-java@v4 + uses: actions/setup-java@v2 with: java-version: '17' distribution: 'zulu' cache: 'gradle' - - - name: Setup Node.js - uses: actions/setup-node@v3 + - name: Install NDK + uses: nttld/setup-ndk@v1 + id: setup-ndk with: - node-version: 18 - cache: 'yarn' + ndk-version: r26d + local-cache: true + - name: Set ANDROID_NDK + run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV + - name: Cache SDK image + id: cache-sdk-img + uses: actions/cache@v3 + with: + path: $ANDROID_HOME/system-images/ + key: ${{ runner.os }}-build-system-images-${{ env.SYSTEM_IMAGES }} + - name: SKDs - download required images + if: ${{ steps.cache-sdd-img.outputs.cache-hit != 'true' }} + run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64" + - name: Cache AVD + id: cache-avd + uses: actions/cache@v3 + with: + path: ~/.android/avd/${{ env.AVD_NAME }}.avd + key: ${{ runner.os }}-avd-images-${{ env.SYSTEM_IMAGES }}-${{ env.AVD_NAME }} + - name: Emulator - Create + if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} + run: $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n ${{ env.AVD_NAME }} --device 28 --package "${{ env.SYSTEM_IMAGES }}" --sdcard 512M + - name: Emulator - Set screen settings + if: ${{ steps.cache-avd.outputs.cache-hit != 'true' }} + run: | + echo "AVD config path: $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini" + sed -i '' 's/.*hw\.lcd\.density.*/hw\.lcd\.density = 480/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini + sed -i '' 's/.*hw\.lcd\.width.*/hw\.lcd\.width = 1344/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini + sed -i '' 's/.*hw\.lcd\.height.*/hw\.lcd\.height = 2992/g' $HOME/.android/avd/${{ env.AVD_NAME }}.avd/config.ini + - name: Emulator - Boot + run: $ANDROID_HOME/emulator/emulator -memory 4096 -avd ${{ env.AVD_NAME }} -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim & + + - name: ADB Wait For Device + run: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' + timeout-minutes: 10 + + - name: Reverse TCP + working-directory: apps/${{ env.WORKING_DIRECTORY }} + run: adb devices | grep '\t' | awk '{print $1}' | sed 's/\\s//g' | xargs -I {} adb -s {} reverse tcp:8081 tcp:8081 - name: Install root node dependencies run: yarn - name: Install example app node dependencies - working-directory: apps/${{ env.WORKING_DIRECTORY }} run: yarn - - - name: Install AVD dependencies - # libxkbfile1 is removed by "Free Disk Space (Ubuntu)" step first. Here we install it again - # as it seems to be needed by the emulator. - run: | - sudo apt update - sudo apt-get install -y libpulse0 libgl1 libxkbfile1 + working-directory: apps/${{ env.WORKING_DIRECTORY }} - name: Build Android app working-directory: apps/${{ env.WORKING_DIRECTORY }}/android - run: E2E=true ./gradlew assembleDebug - - - 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: AVD cache - uses: actions/cache@v4 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: avd-${{ env.API_LEVEL }} + run: ./gradlew assembleDebug - - 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: ${{ env.API_LEVEL }} - target: default - profile: pixel_2 - ram-size: '4096M' - disk-size: '5G' - disable-animations: false - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - avd-name: e2e_emulator - arch: x86_64 - script: echo "Generated AVD snapshot for caching." - - - name: Run emulator, Metro, and E2E - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ env.API_LEVEL }} - target: default - profile: pixel_2 - ram-size: '4096M' - disk-size: '5G' - disable-animations: false - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - avd-name: e2e_emulator - arch: x86_64 - script: | - # Start Metro in the background - E2E=true yarn --cwd apps/${{ env.WORKING_DIRECTORY }} start &> output.log & - # Wait for emulator to boot fully - $ANDROID_HOME/platform-tools/adb wait-for-device - $ANDROID_HOME/platform-tools/adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' - # Install the app APK - $ANDROID_HOME/platform-tools/adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk - # Launch the app using bash - bash -c 'until $ANDROID_HOME/platform-tools/adb shell monkey -p com.paperexample 1 | grep -q "Events injected: 1"; do sleep 1; echo "Retrying app launch..."; done' - - # Run your E2E tests - E2E=true yarn e2e - - # - name: Start Metro server - # working-directory: apps/${{ env.WORKING_DIRECTORY }} - # run: E2E=true yarn start &> output.log & + - name: Start Metro server + working-directory: apps/${{ env.WORKING_DIRECTORY }} + run: E2E=true yarn start &> output.log & - # - name: Install APK - # run: $ANDROID_HOME/platform-tools/adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk + - name: Install APK + run: adb install -r apps/${{ env.WORKING_DIRECTORY }}/android/app/build/outputs/apk/debug/app-debug.apk - # - name: Launch APK - # run: | - # PACKAGE="com.example" - # ACTIVITY=".MainActivity" - # echo "Launching $PACKAGE/$ACTIVITY..." - # $ANDROID_HOME/platform-tools/adb shell am start -n "$PACKAGE/$ACTIVITY" - # $ANDROID_HOME/platform-tools/adb shell 'until pidof com.example > /dev/null; do sleep 1; done' - # echo "App started." + - name: Launch APK + run: 'while ! (adb shell monkey -p com.example 1 | grep -q "Events injected: 1"); do sleep 1; echo "Retrying due to errors in previous run..."; done' - # - name: Run E2E Tests - # run: E2E=true yarn e2e + - name: Run e2e Tests + run: E2E=true yarn e2e - name: Upload test report uses: actions/upload-artifact@v4 @@ -149,3 +114,6 @@ jobs: path: | report.html jest-html-reporters-attach/ + + - name: Kill emulator (so it can be cached safely) + run: adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done diff --git a/apps/common/example/examples/Empty.tsx b/apps/common/example/examples/Empty.tsx index 93cbbf64d..cb915c0ed 100644 --- a/apps/common/example/examples/Empty.tsx +++ b/apps/common/example/examples/Empty.tsx @@ -1,42 +1,8 @@ import React from 'react'; -import { - SafeAreaView, - ScrollView, - StatusBar, - StyleSheet, - Text, - useColorScheme, - View, -} from 'react-native'; -import {Defs, Path, Pattern, Rect, Svg, SvgProps} from 'react-native-svg'; +import {Rect, Svg} from 'react-native-svg'; function EmptyExample() { - const isDarkMode = useColorScheme() === 'dark'; - - const backgroundStyle = { - backgroundColor: 'gray', - }; - - return ( - - - - - - - - - - - ); + return ; } EmptyExample.title = ''; @@ -48,25 +14,3 @@ const icon = ( const samples = [EmptyExample]; export {icon, samples}; - -const TestIcon = (props: SvgProps) => ( - - - - - - - - -); - -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - }, -}); From 163640b90f941fd2b9b1594a714bb2a403341357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 8 Oct 2025 07:54:16 +0200 Subject: [PATCH 42/43] fix: add newline --- apps/paper-macos-example/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/paper-macos-example/Gemfile b/apps/paper-macos-example/Gemfile index 04ef35573..96b4d2923 100644 --- a/apps/paper-macos-example/Gemfile +++ b/apps/paper-macos-example/Gemfile @@ -10,4 +10,4 @@ gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' gem "bigdecimal" gem "logger" gem "benchmark" -gem "mutex_m" \ No newline at end of file +gem "mutex_m" From 076ccf2b25493c864f3fdd23057b7d5789654515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BB=C3=B3=C5=82kiewski?= Date: Wed, 8 Oct 2025 10:49:53 +0200 Subject: [PATCH 43/43] fix: change xcode-version to 16.4 --- .github/workflows/e2e-ios.yml | 2 +- .github/workflows/ios-build-test.yml | 2 +- .github/workflows/macos-build-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index 06e5b8d35..257614448 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -30,7 +30,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '26.0.1' + xcode-version: '16.4' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 diff --git a/.github/workflows/ios-build-test.yml b/.github/workflows/ios-build-test.yml index fc31422bb..977b84fcb 100644 --- a/.github/workflows/ios-build-test.yml +++ b/.github/workflows/ios-build-test.yml @@ -35,7 +35,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '26.0.1' + xcode-version: '16.4' - name: Get react-native-svg node_modules cache uses: actions/cache@v4 diff --git a/.github/workflows/macos-build-test.yml b/.github/workflows/macos-build-test.yml index c33796565..05a16645d 100644 --- a/.github/workflows/macos-build-test.yml +++ b/.github/workflows/macos-build-test.yml @@ -33,7 +33,7 @@ jobs: - name: Use latest stable Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '26.0.1' + xcode-version: '16.4' - name: Get react-native-svg node_modules cache uses: actions/cache@v4