From a75fa8b07dfe23177335ebdaf9d90075d26a468b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 9 Jul 2025 15:35:25 -0500 Subject: [PATCH 01/59] e2e-env-action --- .github/actions/setup-e2e-env/action.yml | 108 +++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 .github/actions/setup-e2e-env/action.yml diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml new file mode 100644 index 00000000..ada83594 --- /dev/null +++ b/.github/actions/setup-e2e-env/action.yml @@ -0,0 +1,108 @@ +name: 'Setup E2E Test Environment' +description: 'Sets up the environment for running E2E tests' +inputs: + platform: + description: 'Platform (ios or android)' + required: true + node-version: + description: 'Node.js version' + required: false + default: '20.18.0' + setup-simulator: + description: 'Whether to setup simulator/emulator' + required: false + default: 'false' + # See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators + ios-simulator-device: + description: Name of iOS simulator device to boot (e.g., "iPhone 15") + required: false + default: "iPhone 15" + cache-prefix: + description: 'Cache key prefix' + required: false + default: 'e2e' + ruby-version: + description: Ruby version to use (only for iOS) + required: false + default: "3.1" + xcode-version: + description: Xcode version to select (e.g., 16.0) + required: false + default: "15.0" + + +runs: + using: "composite" + steps: + +## Common Setup ## + - run: echo "Setup E2E Environment started" + shell: bash + + - name: Install Yarn + run: corepack enable && corepack prepare yarn@stable --activate + shell: bash + + - name: Install Detox CLI + run: yarn global add detox-cli + shell: bash + + - name: Install Foundry + run: curl -L https://foundry.paradigm.xyz | bash && ~/.foundry/bin/foundryup + shell: bash + +## IOS Setup ## + - name: Setup Ruby + if: ${{ inputs.platform == 'ios' }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ inputs.ruby-version }} + + - name: Select Xcode version + if: ${{ inputs.platform == 'ios' }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + shell: bash + + - name: Install CocoaPods + if: ${{ inputs.platform == 'ios' }} + run: sudo gem install cocoapods + shell: bash + + - name: Install applesimutils + if: ${{ inputs.platform == 'ios' }} + run: brew tap wix/brew && brew install applesimutils + shell: bash + + - name: Boot iOS Simulator (if not already booted) + if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} + run: | + echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" + + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") + if [ -z "$SIMULATOR_LINE" ]; then + echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" + exit 1 + fi + + SIMULATOR_ID=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $2}') + SIMULATOR_STATE=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $NF}') + + echo "Simulator ID: $SIMULATOR_ID" + echo "Simulator State: $SIMULATOR_STATE" + + if [ "$SIMULATOR_STATE" = "Booted" ]; then + echo "Simulator is already booted. Skipping boot step." + else + echo "Booting simulator..." + xcrun simctl boot "$SIMULATOR_ID" + fi + shell: bash + + + + + + + + + From ab67becfb6159db204cb73d4647ca291c597137d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 9 Jul 2025 16:07:53 -0500 Subject: [PATCH 02/59] add more deps --- .github/actions/setup-e2e-env/action.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index ada83594..5a1f7a2b 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -17,6 +17,10 @@ inputs: description: Name of iOS simulator device to boot (e.g., "iPhone 15") required: false default: "iPhone 15" + bundler-version: + description: 'Bundler version to use (only for iOS)' + required: false + default: '2.5.8' cache-prefix: description: 'Cache key prefix' required: false @@ -54,18 +58,30 @@ runs: ## IOS Setup ## - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@e851ebd3adcc861aa9e9763c26a9025811f77cd9 # ( v1.245.0 ) with: ruby-version: ${{ inputs.ruby-version }} + - name: Install bundler + if: ${{ inputs.platform == 'ios' }} + run: gem install bundler -v ${{ inputs.bundler-version }} + shell: bash + - name: Select Xcode version if: ${{ inputs.platform == 'ios' }} run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash - - name: Install CocoaPods + - name: Install Ruby gems via bundler if: ${{ inputs.platform == 'ios' }} - run: sudo gem install cocoapods + run: bundle install + working-directory: ios + shell: bash + + - name: Install CocoaPods via bundler + if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} + run: bundle exec pod install + working-directory: ios shell: bash - name: Install applesimutils From 22a7b88557bef52b446f28c48d450e026a30b49b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 9 Jul 2025 16:17:34 -0500 Subject: [PATCH 03/59] fix cursor bug --- .github/actions/setup-e2e-env/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 5a1f7a2b..82ec8dd2 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -92,16 +92,16 @@ runs: - name: Boot iOS Simulator (if not already booted) if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: | - echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" + echo "Looking for simulator named: ${{ inputs.ios-device }}" - SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-device }}") if [ -z "$SIMULATOR_LINE" ]; then - echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" + echo "No simulator found with name '${{ inputs.ios-device }}'" exit 1 fi SIMULATOR_ID=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $2}') - SIMULATOR_STATE=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $NF}') + SIMULATOR_STATE=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $(NF-1)}') echo "Simulator ID: $SIMULATOR_ID" echo "Simulator State: $SIMULATOR_STATE" @@ -117,6 +117,7 @@ runs: + From 610d928d5d9430ae38720c05f8079f7c12e89d5e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 09:47:56 -0500 Subject: [PATCH 04/59] new action shas --- .github/actions/setup-e2e-env/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 82ec8dd2..6e49ba71 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -58,7 +58,7 @@ runs: ## IOS Setup ## - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} - uses: ruby/setup-ruby@e851ebd3adcc861aa9e9763c26a9025811f77cd9 # ( v1.245.0 ) + uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 with: ruby-version: ${{ inputs.ruby-version }} @@ -114,6 +114,11 @@ runs: fi shell: bash +## Android Setup + - name: Setup Java + if: ${{ inputs.platform == 'android' }} + uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 + From 6ebb0f3ecfb6ad5486b8d20982088f7b1231ee01 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 10:16:18 -0500 Subject: [PATCH 05/59] yarn install --- .github/actions/setup-e2e-env/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 6e49ba71..98445e72 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -62,6 +62,11 @@ runs: with: ruby-version: ${{ inputs.ruby-version }} + - name: Install JavaScript dependencies + if: ${{ inputs.platform == 'ios' }} + run: yarn install --frozen-lockfile + shell: bash + - name: Install bundler if: ${{ inputs.platform == 'ios' }} run: gem install bundler -v ${{ inputs.bundler-version }} From f6e583de84731fd259a2641cd13a0935bd54f9b8 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 17:52:31 -0500 Subject: [PATCH 06/59] yarn cache --- .github/actions/setup-e2e-env/action.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 98445e72..bad52702 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -43,10 +43,28 @@ runs: - run: echo "Setup E2E Environment started" shell: bash +## Yarn Setup & Cache Management + - name: Install Yarn run: corepack enable && corepack prepare yarn@stable --activate shell: bash + - name: Restore Yarn cache + uses: actions/cache@8d5c5ea20e39b25cfe73e20a7e3cc8232c7a80e8 + with: + path: | + **/node_modules + key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- + + # Step 3: Install JS deps (fast if node_modules is cached) + - name: Install JavaScript dependencies + if: ${{ inputs.platform == 'ios' }} + run: yarn install --frozen-lockfile + shell: bash + + - name: Install Detox CLI run: yarn global add detox-cli shell: bash From e4322a44ca0694b24fe0f77141867ca1a77444ba Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 17:59:36 -0500 Subject: [PATCH 07/59] cache act --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index bad52702..5b222cd8 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -50,7 +50,7 @@ runs: shell: bash - name: Restore Yarn cache - uses: actions/cache@8d5c5ea20e39b25cfe73e20a7e3cc8232c7a80e8 + uses: actions/cache@v4 with: path: | **/node_modules From 4a813306947ff1181bf014d6de7fd1101c9eac98 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 18:08:29 -0500 Subject: [PATCH 08/59] fix sim device --- .github/actions/setup-e2e-env/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 5b222cd8..81b969d5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -115,11 +115,11 @@ runs: - name: Boot iOS Simulator (if not already booted) if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: | - echo "Looking for simulator named: ${{ inputs.ios-device }}" + echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" - SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-device }}") + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") if [ -z "$SIMULATOR_LINE" ]; then - echo "No simulator found with name '${{ inputs.ios-device }}'" + echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" exit 1 fi From bc2f52fdd495127caf7ffbe5a68936cf3e54ca49 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 18:58:05 -0500 Subject: [PATCH 09/59] bundler-cache --- .github/actions/setup-e2e-env/action.yml | 38 ++++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 81b969d5..59acff55 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -8,6 +8,10 @@ inputs: description: 'Node.js version' required: false default: '20.18.0' + yarn-version: + description: Yarn version to use with Corepack + required: false + default: '1.22.22' setup-simulator: description: 'Whether to setup simulator/emulator' required: false @@ -46,25 +50,24 @@ runs: ## Yarn Setup & Cache Management - name: Install Yarn - run: corepack enable && corepack prepare yarn@stable --activate + run: corepack enable && corepack prepare yarn@${{ inputs.yarn-version }} --activate shell: bash + - name: Restore Yarn cache uses: actions/cache@v4 with: path: | - **/node_modules + node_modules key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- - # Step 3: Install JS deps (fast if node_modules is cached) - name: Install JavaScript dependencies if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash - - name: Install Detox CLI run: yarn global add detox-cli shell: bash @@ -74,33 +77,42 @@ runs: shell: bash ## IOS Setup ## + +## Ruby Setup & Cache Management - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 with: ruby-version: ${{ inputs.ruby-version }} - - name: Install JavaScript dependencies - if: ${{ inputs.platform == 'ios' }} - run: yarn install --frozen-lockfile - shell: bash - + # Install Bundler first - name: Install bundler if: ${{ inputs.platform == 'ios' }} run: gem install bundler -v ${{ inputs.bundler-version }} shell: bash - - name: Select Xcode version + # Restore cached Ruby gems + - name: Restore Bundler cache if: ${{ inputs.platform == 'ios' }} - run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app - shell: bash + uses: actions/cache@v4 + with: + path: ios/vendor/bundle + key: ${{ inputs.cache-prefix }}-bundler-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('ios/Gemfile.lock') }} + restore-keys: | + ${{ inputs.cache-prefix }}-bundler-${{ inputs.platform }}-${{ runner.os }}- + # Install Ruby gems into ios/vendor/bundle ( cache management & awareness ) - name: Install Ruby gems via bundler if: ${{ inputs.platform == 'ios' }} - run: bundle install + run: bundle install --path=vendor/bundle working-directory: ios shell: bash + - name: Select Xcode version + if: ${{ inputs.platform == 'ios' }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + shell: bash + - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: bundle exec pod install From 27eed964de1fd8c92ec390ebefc066dcaba023a8 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 19:19:30 -0500 Subject: [PATCH 10/59] try yarn.lock perf fix --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 59acff55..2ce06385 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -59,7 +59,7 @@ runs: with: path: | node_modules - key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- From c9e4d1eb0e1a630593019770b7a44b25c2d4894e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 19:37:01 -0500 Subject: [PATCH 11/59] cocoapods caching --- .github/actions/setup-e2e-env/action.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2ce06385..8ac54c84 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -101,10 +101,17 @@ runs: restore-keys: | ${{ inputs.cache-prefix }}-bundler-${{ inputs.platform }}-${{ runner.os }}- + # Configure bundler to use a specific path for gem installation + - name: Configure bundler install path + if: ${{ inputs.platform == 'ios' }} + run: bundle config set path 'vendor/bundle' + working-directory: ios + shell: bash + # Install Ruby gems into ios/vendor/bundle ( cache management & awareness ) - name: Install Ruby gems via bundler if: ${{ inputs.platform == 'ios' }} - run: bundle install --path=vendor/bundle + run: bundle install working-directory: ios shell: bash @@ -113,6 +120,16 @@ runs: run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash + - name: Restore CocoaPods cache + if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} + uses: actions/cache@v4 + with: + path: ios/Pods + key: ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: | + ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}- + + - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: bundle exec pod install From f5c4f53ed10a375ab8e1334d51315bacfeb3c722 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:13:06 -0500 Subject: [PATCH 12/59] android tuning --- .github/actions/setup-e2e-env/action.yml | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8ac54c84..1e97f0d4 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -37,6 +37,18 @@ inputs: description: Xcode version to select (e.g., 16.0) required: false default: "15.0" + jdk-version: + description: JDK version to use (only for Android) + required: false + default: "17" + jdk-distribution: + description: JDK distribution to use (only for Android) + required: false + default: "temurin" + ndk-version: + description: NDK version to use (only for Android) + required: false + default: "26.1.10909125" runs: @@ -167,9 +179,33 @@ runs: shell: bash ## Android Setup + +## JDK Setup - name: Setup Java if: ${{ inputs.platform == 'android' }} uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 + with: + java-version: ${{ inputs.jdk-version }} + distribution: ${{ inputs.jdk-distribution }} + +## Android SDK Setup + - name: Install Android SDK packages + if: ${{ inputs.platform == 'android' }} + run: | + yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses + + sdkmanager --install \ + "platform-tools" \ + "platforms;android-34" \ + "build-tools;34.0.0" \ + "emulator" \ + "system-images;android-34;google_apis;x86_64" + + sdkmanager --update + shell: bash + + + From 860c7d4ab2d3fee6422d4c4b840cd221c7f780c5 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:24:41 -0500 Subject: [PATCH 13/59] tuning --- .github/actions/setup-e2e-env/action.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 1e97f0d4..3fa4d7b5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -204,6 +204,19 @@ runs: sdkmanager --update shell: bash + ## NDK Setup + - name: Install Android NDK + if: ${{ inputs.platform == 'android' }} + run: sdkmanager "ndk;${{ inputs.ndk-version }}" + shell: bash + + - name: Set ANDROID_NDK_HOME + if: ${{ inputs.platform == 'android' }} + run: echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> $GITHUB_ENV + shell: bash + + + From 4898cab6e0390b39dc1a1483eb27674153b4b30c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:29:59 -0500 Subject: [PATCH 14/59] license-accepts --- .github/actions/setup-e2e-env/action.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 3fa4d7b5..ebf1f267 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -192,18 +192,22 @@ runs: - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} run: | - yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses + echo "Accepting SDK licenses..." + printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses - sdkmanager --install \ + echo "Installing Android SDK components..." + "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install \ "platform-tools" \ "platforms;android-34" \ "build-tools;34.0.0" \ "emulator" \ "system-images;android-34;google_apis;x86_64" - sdkmanager --update + echo "Updating SDK packages..." + "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update shell: bash + ## NDK Setup - name: Install Android NDK if: ${{ inputs.platform == 'android' }} From 8b76ea875ce616c4d5d09e81cac421d090e1e201 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:38:14 -0500 Subject: [PATCH 15/59] foundry agnostic --- .github/actions/setup-e2e-env/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index ebf1f267..28b3ec17 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -85,8 +85,12 @@ runs: shell: bash - name: Install Foundry - run: curl -L https://foundry.paradigm.xyz | bash && ~/.foundry/bin/foundryup shell: bash + run: | + mkdir -p ~/.foundry + curl -L https://foundry.paradigm.xyz | bash + ~/.foundry/bin/foundryup --quiet + ## IOS Setup ## From f1008f72d4e3a0c550024c2f732faaf2b6ec8c8d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:42:25 -0500 Subject: [PATCH 16/59] setup --- .github/actions/setup-e2e-env/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 28b3ec17..76eeb6e2 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -61,7 +61,8 @@ runs: ## Yarn Setup & Cache Management - - name: Install Yarn + - name: Corepack + id: corepack run: corepack enable && corepack prepare yarn@${{ inputs.yarn-version }} --activate shell: bash @@ -76,17 +77,21 @@ runs: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- - name: Install JavaScript dependencies + id: yarn-install if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash - name: Install Detox CLI + id: install-detox-cli run: yarn global add detox-cli shell: bash - name: Install Foundry + id: install-foundry shell: bash run: | + echo "Installing Foundry..." mkdir -p ~/.foundry curl -L https://foundry.paradigm.xyz | bash ~/.foundry/bin/foundryup --quiet From 9884d8a0a0655c88b7101c0dcd9c6e92021250b9 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:42:59 -0500 Subject: [PATCH 17/59] foundry ubuntu-mac-agnostic --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 76eeb6e2..45a40141 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -94,7 +94,7 @@ runs: echo "Installing Foundry..." mkdir -p ~/.foundry curl -L https://foundry.paradigm.xyz | bash - ~/.foundry/bin/foundryup --quiet + ~/.foundry/bin/foundryup ## IOS Setup ## From 682cafb34f6e6c4b6944bdc62767abddc44c5666 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:47:36 -0500 Subject: [PATCH 18/59] act --- .github/actions/setup-e2e-env/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 45a40141..291ba320 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -88,13 +88,14 @@ runs: shell: bash - name: Install Foundry - id: install-foundry shell: bash run: | echo "Installing Foundry..." - mkdir -p ~/.foundry - curl -L https://foundry.paradigm.xyz | bash - ~/.foundry/bin/foundryup + mkdir -p ~/.foundry/bin + curl -sL https://foundry.paradigm.xyz/foundryup -o ~/.foundry/bin/foundryup + chmod +x ~/.foundry/bin/foundryup + ~/.foundry/bin/foundryup --quiet + ## IOS Setup ## From 6a1ff9081d6c0d87c219a77491f5fb9ce510a17b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:04:10 -0500 Subject: [PATCH 19/59] foundry --- .github/actions/setup-e2e-env/action.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 291ba320..2fd90762 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -49,6 +49,11 @@ inputs: description: NDK version to use (only for Android) required: false default: "26.1.10909125" + foundry-version: + description: Foundry version to install + required: false + default: "v1.2.3" + runs: @@ -90,11 +95,15 @@ runs: - name: Install Foundry shell: bash run: | - echo "Installing Foundry..." + echo "Installing Foundry version: ${{ inputs.foundry-version }}" + mkdir -p ~/.foundry/bin - curl -sL https://foundry.paradigm.xyz/foundryup -o ~/.foundry/bin/foundryup + + curl -sL "https://github.com/foundry-rs/foundry/releases/download/${{ inputs.foundry-version }}/foundryup" -o ~/.foundry/bin/foundryup chmod +x ~/.foundry/bin/foundryup - ~/.foundry/bin/foundryup --quiet + ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} + echo "$HOME/.foundry/bin" >> $GITHUB_PATH + From 38bd065904851bcc93440b89f84424ecbe08ec8f Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:14:58 -0500 Subject: [PATCH 20/59] foundry android --- .github/actions/setup-e2e-env/action.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2fd90762..2bc15cfc 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -93,19 +93,15 @@ runs: shell: bash - name: Install Foundry + id: install-foundry shell: bash run: | echo "Installing Foundry version: ${{ inputs.foundry-version }}" - mkdir -p ~/.foundry/bin - - curl -sL "https://github.com/foundry-rs/foundry/releases/download/${{ inputs.foundry-version }}/foundryup" -o ~/.foundry/bin/foundryup + curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash chmod +x ~/.foundry/bin/foundryup - ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} - echo "$HOME/.foundry/bin" >> $GITHUB_PATH - - - + foundryup --version ${{ inputs.foundry-version }} + echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ## IOS Setup ## From 2f5e2a6bee7abb30e9260ad69d2f86e4148c75ff Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:17:12 -0500 Subject: [PATCH 21/59] remover chmod --- .github/actions/setup-e2e-env/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2bc15cfc..3082d055 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -99,7 +99,6 @@ runs: echo "Installing Foundry version: ${{ inputs.foundry-version }}" mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash - chmod +x ~/.foundry/bin/foundryup foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" From a3ea5d4e557612a022702b37f377460799493ef2 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:20:02 -0500 Subject: [PATCH 22/59] act --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 3082d055..03bd4731 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -99,7 +99,7 @@ runs: echo "Installing Foundry version: ${{ inputs.foundry-version }}" mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash - foundryup --version ${{ inputs.foundry-version }} + ~/.foundry/foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ## IOS Setup ## From 8f3fdcbfd0e1dc5361cb7db40e74a191e676430f Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:21:36 -0500 Subject: [PATCH 23/59] act --- .github/actions/setup-e2e-env/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 03bd4731..de23ff60 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -96,9 +96,10 @@ runs: id: install-foundry shell: bash run: | - echo "Installing Foundry version: ${{ inputs.foundry-version }}" + echo "Downloading Foundry version: ${{ inputs.foundry-version }}" mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash + echo "Running Foundryup to install version: ${{ inputs.foundry-version }}" ~/.foundry/foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" From c7d998722198af7fb61a983e039069b34ae43736 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:23:25 -0500 Subject: [PATCH 24/59] act --- .github/actions/setup-e2e-env/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index de23ff60..8b4ff152 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -100,7 +100,8 @@ runs: mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash echo "Running Foundryup to install version: ${{ inputs.foundry-version }}" - ~/.foundry/foundryup --version ${{ inputs.foundry-version }} + ls ~/.foundry/bin + ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ## IOS Setup ## From 90d1bd2385bf4686df1c6572b4fb2c443cfc10d9 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:51:19 -0500 Subject: [PATCH 25/59] foundry --- .github/actions/setup-e2e-env/action.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8b4ff152..bc3d82ef 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -93,16 +93,14 @@ runs: shell: bash - name: Install Foundry - id: install-foundry shell: bash + id: install-foundry run: | - echo "Downloading Foundry version: ${{ inputs.foundry-version }}" - mkdir -p ~/.foundry/bin - curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash - echo "Running Foundryup to install version: ${{ inputs.foundry-version }}" - ls ~/.foundry/bin - ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} + echo "Installing Foundry via foundryup..." + curl -L https://foundry.paradigm.xyz | bash echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" + ~/.foundry/bin/foundryup + ## IOS Setup ## From bfd20d8fabe155b989ae570fab2e7d9561d4a482 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:53:21 -0500 Subject: [PATCH 26/59] act --- .github/actions/setup-e2e-env/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index bc3d82ef..e45b0944 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -94,14 +94,16 @@ runs: - name: Install Foundry shell: bash - id: install-foundry run: | echo "Installing Foundry via foundryup..." - curl -L https://foundry.paradigm.xyz | bash + mkdir -p ~/.foundry/bin + curl -sL https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/bin/foundryup + chmod +x ~/.foundry/bin/foundryup echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ~/.foundry/bin/foundryup + ## IOS Setup ## ## Ruby Setup & Cache Management From 6d49bac79bf8c9045f7198490401cfb30d7b713f Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:56:05 -0500 Subject: [PATCH 27/59] cfgs --- .github/actions/setup-e2e-env/action.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index e45b0944..32143333 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -96,11 +96,19 @@ runs: shell: bash run: | echo "Installing Foundry via foundryup..." - mkdir -p ~/.foundry/bin - curl -sL https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/bin/foundryup - chmod +x ~/.foundry/bin/foundryup - echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" - ~/.foundry/bin/foundryup + + export FOUNDRY_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/.foundry" + export FOUNDRY_BIN="$FOUNDRY_DIR/bin" + + mkdir -p "$FOUNDRY_BIN" + + curl -sL https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o "$FOUNDRY_BIN/foundryup" + chmod +x "$FOUNDRY_BIN/foundryup" + + echo "$FOUNDRY_BIN" >> "$GITHUB_PATH" + + "$FOUNDRY_BIN/foundryup" + From b2e0ef39049eabbb7da1db55a6471f8729aa01cb Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:05:12 -0500 Subject: [PATCH 28/59] ndk setup --- .github/actions/setup-e2e-env/action.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 32143333..8e835aa3 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -233,11 +233,20 @@ runs: ## NDK Setup + + - name: Ensure sdkmanager is available + run: | + yes | "${ANDROID_SDK_ROOT}/cmdline-tools/11.0/bin/sdkmanager" --licenses + shell: bash + + - name: Install Android NDK if: ${{ inputs.platform == 'android' }} - run: sdkmanager "ndk;${{ inputs.ndk-version }}" + run: | + "${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" shell: bash + - name: Set ANDROID_NDK_HOME if: ${{ inputs.platform == 'android' }} run: echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> $GITHUB_ENV From c35dbc6d431a589d3fe76debe2bdad973b2c249b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:10:51 -0500 Subject: [PATCH 29/59] ndk --- .github/actions/setup-e2e-env/action.yml | 29 ++++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8e835aa3..5b75074c 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -234,22 +234,36 @@ runs: ## NDK Setup - - name: Ensure sdkmanager is available + - name: Debug Android SDK Paths + if: ${{ inputs.platform == 'android' }} run: | - yes | "${ANDROID_SDK_ROOT}/cmdline-tools/11.0/bin/sdkmanager" --licenses + echo "ANDROID_HOME: $ANDROID_HOME" + echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" + echo "Available sdkmanager paths:" + find "$ANDROID_HOME" -type f -name sdkmanager || true shell: bash - - - name: Install Android NDK + - name: Accept Android SDK Licenses if: ${{ inputs.platform == 'android' }} run: | - "${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" + yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses shell: bash + - name: Install Android SDK Packages + if: ${{ inputs.platform == 'android' }} + run: | + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install \ + "platform-tools" \ + "platforms;android-34" \ + "build-tools;34.0.0" \ + "emulator" \ + "system-images;android-34;google_apis;x86_64" + shell: bash - - name: Set ANDROID_NDK_HOME + - name: Install Android NDK if: ${{ inputs.platform == 'android' }} - run: echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> $GITHUB_ENV + run: | + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" shell: bash @@ -261,6 +275,7 @@ runs: + From 9e75e069a72f7577eeda9f3fef0b6c7b8cbf4b41 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:13:35 -0500 Subject: [PATCH 30/59] ndk --- .github/actions/setup-e2e-env/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 5b75074c..8d002605 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -239,10 +239,15 @@ runs: run: | echo "ANDROID_HOME: $ANDROID_HOME" echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" - echo "Available sdkmanager paths:" - find "$ANDROID_HOME" -type f -name sdkmanager || true + + echo "Searching for sdkmanager under cmdline-tools..." + find "$ANDROID_HOME/cmdline-tools" -type f -name sdkmanager || echo "sdkmanager not found" + + echo "Listing directories under cmdline-tools for visibility:" + ls -R "$ANDROID_HOME/cmdline-tools" || echo "cmdline-tools directory missing" shell: bash + - name: Accept Android SDK Licenses if: ${{ inputs.platform == 'android' }} run: | From dda3178cdda79292980fcb9482a21add9150db2d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:16:39 -0500 Subject: [PATCH 31/59] act --- .github/actions/setup-e2e-env/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8d002605..8bc3c4c2 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -248,12 +248,14 @@ runs: shell: bash - - name: Accept Android SDK Licenses + - name: Accept Android SDK licenses if: ${{ inputs.platform == 'android' }} run: | - yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses + echo "Accepting Android SDK licenses..." + printf 'y\n%.0s' {1..20} | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses shell: bash + - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | From 03cd24bd547349017f8c52e57066a6541e4fd963 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:23:01 -0500 Subject: [PATCH 32/59] licenses --- .github/actions/setup-e2e-env/action.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8bc3c4c2..7cd24dfe 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -239,12 +239,6 @@ runs: run: | echo "ANDROID_HOME: $ANDROID_HOME" echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" - - echo "Searching for sdkmanager under cmdline-tools..." - find "$ANDROID_HOME/cmdline-tools" -type f -name sdkmanager || echo "sdkmanager not found" - - echo "Listing directories under cmdline-tools for visibility:" - ls -R "$ANDROID_HOME/cmdline-tools" || echo "cmdline-tools directory missing" shell: bash @@ -252,10 +246,11 @@ runs: if: ${{ inputs.platform == 'android' }} run: | echo "Accepting Android SDK licenses..." - printf 'y\n%.0s' {1..20} | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses + bash -c 'yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses' || true shell: bash + - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | From 4b4e46f9a2f03cc9fbddd5c81e3d7f16e20852dd Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:27:31 -0500 Subject: [PATCH 33/59] android tools --- .github/actions/setup-e2e-env/action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7cd24dfe..aaabaff6 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -250,7 +250,6 @@ runs: shell: bash - - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | @@ -268,6 +267,15 @@ runs: "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" shell: bash + - name: Add Android tools to PATH + if: ${{ inputs.platform == 'android' }} + run: | + echo "$ANDROID_HOME/platform-tools" >> "$GITHUB_PATH" + echo "$ANDROID_HOME/emulator" >> "$GITHUB_PATH" + echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" + shell: bash + + From 02ff9a92b1b3367f704c6a96c8752be0b8e18abd Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:32:10 -0500 Subject: [PATCH 34/59] e2e --- .github/actions/setup-e2e-env/action.yml | 29 +++++++++++------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index aaabaff6..7b6af29d 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -213,6 +213,14 @@ runs: distribution: ${{ inputs.jdk-distribution }} ## Android SDK Setup + + - name: Install required emulator dependencies + if: ${{ inputs.platform == 'android' }} + run: | + sudo apt-get update + sudo apt-get install -y libpulse0 libglu1-mesa + shell: bash + - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} run: | @@ -275,19 +283,8 @@ runs: echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" shell: bash - - - - - - - - - - - - - - - - + - name: Check Installed NDK Versions + run: | + echo "Installed NDKs:" + ls -la "$ANDROID_SDK_ROOT/ndk" || echo "No NDK installed" + shell: bash From 5695370448cf0490b14ad0aced71da33f5082d65 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:39:52 -0500 Subject: [PATCH 35/59] act --- .github/actions/setup-e2e-env/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7b6af29d..a3375836 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -283,6 +283,13 @@ runs: echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" shell: bash + - name: Add NDK toolchain to PATH + if: ${{ inputs.platform == 'android' }} + run: | + NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" + echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" + shell : bash + - name: Check Installed NDK Versions run: | echo "Installed NDKs:" From f399c35ba12447b233733e651b7559ba035de4dc Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:47:20 -0500 Subject: [PATCH 36/59] act --- .github/actions/setup-e2e-env/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index a3375836..7be5f9e1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -283,11 +283,12 @@ runs: echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" shell: bash - - name: Add NDK toolchain to PATH + - name: Add NDK related toolchains to PATH if: ${{ inputs.platform == 'android' }} run: | NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" + echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" shell : bash - name: Check Installed NDK Versions From 4d875528b92c6b9099789395976e60d8e57ddac5 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 23:00:50 -0500 Subject: [PATCH 37/59] upgrade default xcode-version --- .github/actions/setup-e2e-env/action.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7be5f9e1..19259f0e 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -34,9 +34,9 @@ inputs: required: false default: "3.1" xcode-version: - description: Xcode version to select (e.g., 16.0) + description: Xcode version to select (e.g., 16.2) required: false - default: "15.0" + default: "16.2" jdk-version: description: JDK version to use (only for Android) required: false @@ -151,11 +151,13 @@ runs: working-directory: ios shell: bash + # Select Xcode version - name: Select Xcode version if: ${{ inputs.platform == 'ios' }} run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash + # Restore CocoaPods cache - name: Restore CocoaPods cache if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} uses: actions/cache@v4 @@ -165,7 +167,7 @@ runs: restore-keys: | ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}- - + # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: bundle exec pod install @@ -202,7 +204,8 @@ runs: fi shell: bash -## Android Setup + +## Android Setup ## ## JDK Setup - name: Setup Java @@ -289,10 +292,4 @@ runs: NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" - shell : bash - - - name: Check Installed NDK Versions - run: | - echo "Installed NDKs:" - ls -la "$ANDROID_SDK_ROOT/ndk" || echo "No NDK installed" - shell: bash + shell : bash \ No newline at end of file From 929ddaaba614e40d28514263ae5f6d4c0f295ae1 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 10:23:13 -0500 Subject: [PATCH 38/59] e2e --- .github/actions/setup-e2e-env/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 19259f0e..463173ea 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -86,6 +86,8 @@ runs: if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash + env: + NODE_OPTIONS: --max-old-space-size=4096 # Increase memory limit for Node.js due to large dependencies - name: Install Detox CLI id: install-detox-cli From d9de05d4c20c649b2467ef2a5b43a99f0807e750 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 14:02:09 -0500 Subject: [PATCH 39/59] lint --- .github/actions/setup-e2e-env/action.yml | 56 ++++++++++-------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 463173ea..22de0e84 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -17,10 +17,10 @@ inputs: required: false default: 'false' # See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators - ios-simulator-device: + ios-simulator-device: description: Name of iOS simulator device to boot (e.g., "iPhone 15") required: false - default: "iPhone 15" + default: 'iPhone 15' bundler-version: description: 'Bundler version to use (only for iOS)' required: false @@ -32,46 +32,42 @@ inputs: ruby-version: description: Ruby version to use (only for iOS) required: false - default: "3.1" + default: '3.1' xcode-version: description: Xcode version to select (e.g., 16.2) required: false - default: "16.2" + default: '16.2' jdk-version: description: JDK version to use (only for Android) required: false - default: "17" + default: '17' jdk-distribution: description: JDK distribution to use (only for Android) required: false - default: "temurin" + default: 'temurin' ndk-version: description: NDK version to use (only for Android) required: false - default: "26.1.10909125" + default: '26.1.10909125' foundry-version: description: Foundry version to install required: false - default: "v1.2.3" - - + default: 'v1.2.3' runs: - using: "composite" + using: 'composite' steps: - -## Common Setup ## + ## Common Setup ## - run: echo "Setup E2E Environment started" shell: bash -## Yarn Setup & Cache Management + ## Yarn Setup & Cache Management - name: Corepack id: corepack run: corepack enable && corepack prepare yarn@${{ inputs.yarn-version }} --activate shell: bash - - name: Restore Yarn cache uses: actions/cache@v4 with: @@ -83,7 +79,6 @@ runs: - name: Install JavaScript dependencies id: yarn-install - if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash env: @@ -98,7 +93,7 @@ runs: shell: bash run: | echo "Installing Foundry via foundryup..." - + export FOUNDRY_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/.foundry" export FOUNDRY_BIN="$FOUNDRY_DIR/bin" @@ -111,12 +106,9 @@ runs: "$FOUNDRY_BIN/foundryup" + ## IOS Setup ## - - -## IOS Setup ## - -## Ruby Setup & Cache Management + ## Ruby Setup & Cache Management - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 @@ -206,10 +198,9 @@ runs: fi shell: bash + ## Android Setup ## -## Android Setup ## - -## JDK Setup + ## JDK Setup - name: Setup Java if: ${{ inputs.platform == 'android' }} uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 @@ -217,7 +208,7 @@ runs: java-version: ${{ inputs.jdk-version }} distribution: ${{ inputs.jdk-distribution }} -## Android SDK Setup + ## Android SDK Setup - name: Install required emulator dependencies if: ${{ inputs.platform == 'android' }} @@ -244,8 +235,7 @@ runs: "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update shell: bash - - ## NDK Setup + ## NDK Setup - name: Debug Android SDK Paths if: ${{ inputs.platform == 'android' }} @@ -254,7 +244,6 @@ runs: echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" shell: bash - - name: Accept Android SDK licenses if: ${{ inputs.platform == 'android' }} run: | @@ -262,7 +251,6 @@ runs: bash -c 'yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses' || true shell: bash - - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | @@ -291,7 +279,7 @@ runs: - name: Add NDK related toolchains to PATH if: ${{ inputs.platform == 'android' }} run: | - NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" - echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" - echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" - shell : bash \ No newline at end of file + NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" + echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" + echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" + shell: bash From 18421e818eb3b4a94a5d12f32bfa4f8f80d1279c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:00:15 -0500 Subject: [PATCH 40/59] android-simulator --- .github/actions/setup-e2e-env/action.yml | 50 ++++++++++++++++++++---- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 22de0e84..61b2f0f1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -17,8 +17,8 @@ inputs: required: false default: 'false' # See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators - ios-simulator-device: - description: Name of iOS simulator device to boot (e.g., "iPhone 15") + ios-device: + description: Name of iOS device to boot (e.g., "iPhone 15") required: false default: 'iPhone 15' bundler-version: @@ -53,6 +53,18 @@ inputs: description: Foundry version to install required: false default: 'v1.2.3' + android-avd-name: + description: 'Name of AVD to create and boot (for Android)' + required: false + default: 'test_e2e_avd' + android-device: + description: 'AVD device profile (e.g. "pixel")' + required: false + default: 'pixel' + android-api-level: + description: 'Android API level to use (e.g. "34")' + required: false + default: '34' runs: using: 'composite' @@ -176,11 +188,11 @@ runs: - name: Boot iOS Simulator (if not already booted) if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: | - echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" + echo "Looking for simulator named: ${{ inputs.ios-device }}" - SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-device }}") if [ -z "$SIMULATOR_LINE" ]; then - echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" + echo "No simulator found with name '${{ inputs.ios-device }}'" exit 1 fi @@ -256,10 +268,10 @@ runs: run: | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install \ "platform-tools" \ - "platforms;android-34" \ + "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-34;google_apis;x86_64" + "system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" shell: bash - name: Install Android NDK @@ -283,3 +295,27 @@ runs: echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" shell: bash + + ## Launch AVD + - name: Install Android system image + if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + run: | + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + echo "Installing system image: $IMAGE" + "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" + shell: bash + + - name: Create Android Virtual Device (AVD) + if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + run: | + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ + --name ${{ inputs.android-avd-name }} \ + --package "$IMAGE" \ + --device ${ inputs.android-device } + shell: bash + + - name: Launch Android Emulator + if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} + run: nohup $ANDROID_HOME/emulator/emulator -avd ${{ inputs.android-avd-name }} -no-window -no-audio -no-boot-anim > /dev/null 2>&1 & + shell: bash From 93cf96ae2ba6d22eaa67286bc50b8a52eade70b5 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:05:03 -0500 Subject: [PATCH 41/59] android-act --- .github/actions/setup-e2e-env/action.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 61b2f0f1..9c3b1791 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -297,6 +297,7 @@ runs: shell: bash ## Launch AVD + - name: Install Android system image if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} run: | @@ -315,7 +316,32 @@ runs: --device ${ inputs.android-device } shell: bash + # Launch Android Emulator - name: Launch Android Emulator if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} run: nohup $ANDROID_HOME/emulator/emulator -avd ${{ inputs.android-avd-name }} -no-window -no-audio -no-boot-anim > /dev/null 2>&1 & shell: bash + + ## Wait for Emulator to Boot + - name: Wait for Android Emulator to Boot + if: ${{ inputs.platform == 'android' }} + run: | + adb wait-for-device + bootanim="" + timeout=300 # 5 minutes in seconds + elapsed=0 + + until [[ "$bootanim" == *"stopped"* || "$elapsed" -ge "$timeout" ]]; do + bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null) + echo "Waiting for emulator... ($bootanim) (${elapsed}s elapsed)" + sleep 5 + elapsed=$((elapsed + 5)) + done + + if [[ "$bootanim" != *"stopped"* ]]; then + echo "❌ Timeout waiting for emulator to boot" + exit 1 + fi + + echo "✅ Emulator booted successfully" + shell: bash From db782297505f2ceba855a3a3867b1cf642927600 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:11:52 -0500 Subject: [PATCH 42/59] fix emu bug --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 9c3b1791..d1c77c91 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -313,7 +313,7 @@ runs: echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ --name ${{ inputs.android-avd-name }} \ --package "$IMAGE" \ - --device ${ inputs.android-device } + --device "${{ inputs.android-device }}" shell: bash # Launch Android Emulator From 37051d08e2e1e8d3d4e9a90fb81f47276bbdf506 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:22:53 -0500 Subject: [PATCH 43/59] act --- .github/actions/setup-e2e-env/action.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index d1c77c91..687f01d9 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -326,22 +326,27 @@ runs: - name: Wait for Android Emulator to Boot if: ${{ inputs.platform == 'android' }} run: | + echo "Waiting for emulator to be ready..." adb wait-for-device + bootanim="" timeout=300 # 5 minutes in seconds elapsed=0 - until [[ "$bootanim" == *"stopped"* || "$elapsed" -ge "$timeout" ]]; do - bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null) + while [[ "$elapsed" -lt "$timeout" ]]; do + bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null || echo "unknown") echo "Waiting for emulator... ($bootanim) (${elapsed}s elapsed)" + + if [[ "$bootanim" == *"stopped"* ]]; then + echo "✅ Emulator booted successfully" + exit 0 + fi + sleep 5 elapsed=$((elapsed + 5)) done - if [[ "$bootanim" != *"stopped"* ]]; then - echo "❌ Timeout waiting for emulator to boot" - exit 1 - fi - - echo "✅ Emulator booted successfully" + echo "❌ Timeout waiting for emulator to boot" + exit 1 shell: bash + From dade4762c46c41351b9d271436695f984a4e888c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:35:50 -0500 Subject: [PATCH 44/59] act --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 687f01d9..82d56642 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -319,7 +319,7 @@ runs: # Launch Android Emulator - name: Launch Android Emulator if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} - run: nohup $ANDROID_HOME/emulator/emulator -avd ${{ inputs.android-avd-name }} -no-window -no-audio -no-boot-anim > /dev/null 2>&1 & + run: $ANDROID_HOME/emulator/emulator -avd test_e2e_avd -no-audio -no-boot-anim -no-window -verbose shell: bash ## Wait for Emulator to Boot From 852925609a53c81893997a24cbe0a72c39371cb8 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:43:42 -0500 Subject: [PATCH 45/59] emulator bugs --- .github/actions/setup-e2e-env/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 82d56642..66dd2da5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -299,7 +299,7 @@ runs: ## Launch AVD - name: Install Android system image - if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" echo "Installing system image: $IMAGE" @@ -307,11 +307,11 @@ runs: shell: bash - name: Create Android Virtual Device (AVD) - if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ - --name ${{ inputs.android-avd-name }} \ + --name "${{ inputs.android-avd-name }}" \ --package "$IMAGE" \ --device "${{ inputs.android-device }}" shell: bash @@ -324,7 +324,7 @@ runs: ## Wait for Emulator to Boot - name: Wait for Android Emulator to Boot - if: ${{ inputs.platform == 'android' }} + if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} run: | echo "Waiting for emulator to be ready..." adb wait-for-device From 3b49d849bf1ab5cc4085807614fcf11433ec74bd Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:02:32 -0500 Subject: [PATCH 46/59] android-sim --- .github/actions/setup-e2e-env/action.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 66dd2da5..3b137eb1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -298,6 +298,8 @@ runs: ## Launch AVD +## Launch AVD + - name: Install Android system image if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | @@ -306,25 +308,40 @@ runs: "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" shell: bash + - name: Set ANDROID_AVD_HOME for downstream steps + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + shell: bash + run: | + echo "ANDROID_AVD_HOME=$HOME/.android/avd" >> "$GITHUB_ENV" + mkdir -p "$HOME/.android/avd" + - name: Create Android Virtual Device (AVD) if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + echo "Creating AVD with image: $IMAGE" echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ --name "${{ inputs.android-avd-name }}" \ --package "$IMAGE" \ --device "${{ inputs.android-device }}" shell: bash + - name: List available AVDs + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + run: | + echo "✅ Available AVDs:" + "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" list avd || true + # Launch Android Emulator - name: Launch Android Emulator - if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} - run: $ANDROID_HOME/emulator/emulator -avd test_e2e_avd -no-audio -no-boot-anim -no-window -verbose + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + run: | + "$ANDROID_HOME/emulator/emulator" -avd "${{ inputs.android-avd-name }}" -no-audio -no-boot-anim -no-window -verbose shell: bash ## Wait for Emulator to Boot - name: Wait for Android Emulator to Boot - if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | echo "Waiting for emulator to be ready..." adb wait-for-device @@ -350,3 +367,4 @@ runs: exit 1 shell: bash + From a4ca242158ee881023863c24d53298cd6853536e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:04:25 -0500 Subject: [PATCH 47/59] act --- .github/actions/setup-e2e-env/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 3b137eb1..241c423a 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -328,6 +328,7 @@ runs: - name: List available AVDs if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + shell: bash run: | echo "✅ Available AVDs:" "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" list avd || true From b1867a914271f7d3b97d95d393bb8738f569bd2d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:16:33 -0500 Subject: [PATCH 48/59] act --- .github/actions/setup-e2e-env/action.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 241c423a..e71dc9a0 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -65,6 +65,11 @@ inputs: description: 'Android API level to use (e.g. "34")' required: false default: '34' + android-abi: + description: 'System architecture ABI for the Android system image (e.g. x86_64, arm64-v8a, armeabi-v7a)' + required: false + default: 'arm64-v8a' + runs: using: 'composite' @@ -238,10 +243,10 @@ runs: echo "Installing Android SDK components..." "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install \ "platform-tools" \ - "platforms;android-34" \ + "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-34;google_apis;x86_64" + "system-images;android-34;google_apis;${{ inputs.android-abi }}" \ echo "Updating SDK packages..." "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update @@ -271,7 +276,7 @@ runs: "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" shell: bash - name: Install Android NDK @@ -303,7 +308,7 @@ runs: - name: Install Android system image if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Installing system image: $IMAGE" "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" shell: bash @@ -318,7 +323,7 @@ runs: - name: Create Android Virtual Device (AVD) if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Creating AVD with image: $IMAGE" echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ --name "${{ inputs.android-avd-name }}" \ From 860e85f9a4e89d4723c6e5e494f358fce112c43e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:34:19 -0500 Subject: [PATCH 49/59] env --- .github/actions/setup-e2e-env/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index e71dc9a0..8c040811 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -227,12 +227,12 @@ runs: ## Android SDK Setup - - name: Install required emulator dependencies - if: ${{ inputs.platform == 'android' }} - run: | - sudo apt-get update - sudo apt-get install -y libpulse0 libglu1-mesa - shell: bash + # - name: Install required emulator dependencies + # if: ${{ inputs.platform == 'android' }} + # run: | + # sudo apt-get update + # sudo apt-get install -y libpulse0 libglu1-mesa + # shell: bash - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} From 032380e447a50a81cd6cdbceba0c57eb4027dd45 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:37:02 -0500 Subject: [PATCH 50/59] update android default abi --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8c040811..312c75a5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -68,7 +68,7 @@ inputs: android-abi: description: 'System architecture ABI for the Android system image (e.g. x86_64, arm64-v8a, armeabi-v7a)' required: false - default: 'arm64-v8a' + default: 'x86_64' runs: From eea10a61e6e4f6cd6c2e037a0d58f09bc1d3712c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:48:11 -0500 Subject: [PATCH 51/59] act --- .github/actions/setup-e2e-env/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 312c75a5..24358f25 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -342,7 +342,12 @@ runs: - name: Launch Android Emulator if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - "$ANDROID_HOME/emulator/emulator" -avd "${{ inputs.android-avd-name }}" -no-audio -no-boot-anim -no-window -verbose + nohup "$ANDROID_HOME/emulator/emulator" \ + -avd "${{ inputs.android-avd-name }}" \ + -no-audio \ + -no-boot-anim \ + -no-window \ + -verbose > /dev/null 2>&1 & shell: bash ## Wait for Emulator to Boot From 13662757307a9b5dec0584f1fc5006291e8c90a9 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 19:39:11 -0500 Subject: [PATCH 52/59] linting --- .github/actions/setup-e2e-env/action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 24358f25..cad340cb 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -70,7 +70,6 @@ inputs: required: false default: 'x86_64' - runs: using: 'composite' steps: @@ -303,7 +302,7 @@ runs: ## Launch AVD -## Launch AVD + ## Launch AVD - name: Install Android system image if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} @@ -377,5 +376,3 @@ runs: echo "❌ Timeout waiting for emulator to boot" exit 1 shell: bash - - From 367c013c332b567159831dfb4ad69b2432fdc530 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Tue, 15 Jul 2025 16:33:52 -0500 Subject: [PATCH 53/59] always lay out simulator cfgs --- .github/actions/setup-e2e-env/action.yml | 27 ++++++++---------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index cad340cb..2be4eef4 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -226,12 +226,12 @@ runs: ## Android SDK Setup - # - name: Install required emulator dependencies - # if: ${{ inputs.platform == 'android' }} - # run: | - # sudo apt-get update - # sudo apt-get install -y libpulse0 libglu1-mesa - # shell: bash + - name: Install required emulator dependencies + if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} + run: | + sudo apt-get update + sudo apt-get install -y libpulse0 libglu1-mesa + shell: bash - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} @@ -302,10 +302,8 @@ runs: ## Launch AVD - ## Launch AVD - - name: Install Android system image - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Installing system image: $IMAGE" @@ -313,14 +311,14 @@ runs: shell: bash - name: Set ANDROID_AVD_HOME for downstream steps - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android'}} shell: bash run: | echo "ANDROID_AVD_HOME=$HOME/.android/avd" >> "$GITHUB_ENV" mkdir -p "$HOME/.android/avd" - name: Create Android Virtual Device (AVD) - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android'}} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Creating AVD with image: $IMAGE" @@ -330,13 +328,6 @@ runs: --device "${{ inputs.android-device }}" shell: bash - - name: List available AVDs - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} - shell: bash - run: | - echo "✅ Available AVDs:" - "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" list avd || true - # Launch Android Emulator - name: Launch Android Emulator if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} From d7a349b87908485cfff22c5a76d114f8af3ba88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Wed, 16 Jul 2025 14:56:23 +0100 Subject: [PATCH 54/59] E2e ubuntu runners (#87) * feat(INFRA-2766): update for ubuntu runners * feat(INFRA-2766): remove ios references not used * feat(INFRA-2766): pwetty --- .github/actions/setup-e2e-env/action.yml | 85 ++++++++++++++---------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2be4eef4..2a29f58f 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -230,7 +230,13 @@ runs: if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} run: | sudo apt-get update - sudo apt-get install -y libpulse0 libglu1-mesa + sudo apt-get install -y \ + libpulse0 \ + libglu1-mesa \ + libnss3 \ + libxss1 + + echo "✅ Linux dependencies installed successfully" shell: bash - name: Install Android SDK packages @@ -245,10 +251,12 @@ runs: "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-34;google_apis;${{ inputs.android-abi }}" \ + "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" \ echo "Updating SDK packages..." "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update + + echo "✅ Android SDK packages installed successfully" shell: bash ## NDK Setup @@ -260,24 +268,6 @@ runs: echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" shell: bash - - name: Accept Android SDK licenses - if: ${{ inputs.platform == 'android' }} - run: | - echo "Accepting Android SDK licenses..." - bash -c 'yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses' || true - shell: bash - - - name: Install Android SDK Packages - if: ${{ inputs.platform == 'android' }} - run: | - "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install \ - "platform-tools" \ - "platforms;android-${{ inputs.android-api-level }}" \ - "build-tools;34.0.0" \ - "emulator" \ - "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" - shell: bash - - name: Install Android NDK if: ${{ inputs.platform == 'android' }} run: | @@ -302,14 +292,6 @@ runs: ## Launch AVD - - name: Install Android system image - if: ${{ inputs.platform == 'android' }} - run: | - IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" - echo "Installing system image: $IMAGE" - "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" - shell: bash - - name: Set ANDROID_AVD_HOME for downstream steps if: ${{ inputs.platform == 'android'}} shell: bash @@ -332,11 +314,16 @@ runs: - name: Launch Android Emulator if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | + # Linux with KVM hardware acceleration nohup "$ANDROID_HOME/emulator/emulator" \ -avd "${{ inputs.android-avd-name }}" \ -no-audio \ -no-boot-anim \ -no-window \ + -gpu swiftshader_indirect \ + -no-snapshot \ + -wipe-data \ + -accel on \ -verbose > /dev/null 2>&1 & shell: bash @@ -344,26 +331,56 @@ runs: - name: Wait for Android Emulator to Boot if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - echo "Waiting for emulator to be ready..." + echo "Waiting for emulator to be ready on $RUNNER_OS..." + + # Wait for device to be detected by ADB + echo "Waiting for ADB to detect device..." adb wait-for-device + # Additional wait for emulator to stabilize + sleep 10 + + # Check emulator status + echo "Checking emulator processes..." + if [ "$RUNNER_OS" = "Linux" ]; then + ps aux | grep emulator || echo "No emulator processes found" + fi + + # Wait for boot to complete bootanim="" - timeout=300 # 5 minutes in seconds + timeout=600 # 10 minutes for initial boot (Linux might be slower) elapsed=0 while [[ "$elapsed" -lt "$timeout" ]]; do bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null || echo "unknown") - echo "Waiting for emulator... ($bootanim) (${elapsed}s elapsed)" + sys_boot_completed=$(adb shell getprop sys.boot_completed 2>/dev/null || echo "0") + + echo "Waiting for emulator... bootanim: $bootanim, boot_completed: $sys_boot_completed (${elapsed}s elapsed)" - if [[ "$bootanim" == *"stopped"* ]]; then + if [[ "$bootanim" == *"stopped"* ]] && [[ "$sys_boot_completed" == "1" ]]; then echo "✅ Emulator booted successfully" + + # Unlock screen and disable animations for testing + adb shell input keyevent 82 # Unlock + adb shell settings put global window_animation_scale 0 + adb shell settings put global transition_animation_scale 0 + adb shell settings put global animator_duration_scale 0 + + echo "✅ Emulator is ready for testing" exit 0 fi - sleep 5 - elapsed=$((elapsed + 5)) + sleep 10 + elapsed=$((elapsed + 10)) done echo "❌ Timeout waiting for emulator to boot" + + # Debug information on failure + echo "Debug: ADB devices:" + adb devices + echo "Debug: Emulator processes:" + ps aux | grep emulator || echo "No emulator processes found" + exit 1 shell: bash From 4947ccda9fc5fae3c8eed9ac50a93446d84e0bde Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 16 Jul 2025 14:24:58 -0500 Subject: [PATCH 55/59] keystore-actions --- .github/actions/configure-keystore/action.yml | 40 +++++++++++++++++++ .github/actions/setup-e2e-env/action.yml | 4 ++ 2 files changed, 44 insertions(+) create mode 100644 .github/actions/configure-keystore/action.yml diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml new file mode 100644 index 00000000..ee6b4ea3 --- /dev/null +++ b/.github/actions/configure-keystore/action.yml @@ -0,0 +1,40 @@ +name: "Configure Keystore" +description: "Assume an AWS role and fetch a secret into environment variables" +inputs: + aws-role-to-assume: + description: "The AWS IAM role to assume" + required: true + aws-region: + description: "The AWS region where the secret is stored" + required: true + secret-name: + description: "The name of the secret in AWS Secrets Manager" + required: true + platform: + description: "The platform for which the keystore is being configured (e.g., ios, android)" + required: true + +runs: + using: "composite" + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ inputs.aws-role-to-assume }} + aws-region: ${{ inputs.aws-region }} + + - name: Fetch secret and export as environment variables + shell: bash + run: | + secret_json=$(aws secretsmanager get-secret-value \ + --region "${{ inputs.aws-region }}" \ + --secret-id "${{ inputs.secret-name }}" \ + --query SecretString \ + --output text) + + keys=$(echo "$secret_json" | jq -r 'keys[]') + for key in $keys; do + value=$(echo "$secret_json" | jq -r --arg k "$key" '.[$k]') + echo "::add-mask::$value" + echo "$key=$value" >> "$GITHUB_ENV" + done \ No newline at end of file diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2a29f58f..fe444734 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -69,6 +69,10 @@ inputs: description: 'System architecture ABI for the Android system image (e.g. x86_64, arm64-v8a, armeabi-v7a)' required: false default: 'x86_64' + configure-keystores: + description: 'Whether to configure keystores for E2E tests' + required: false + default: 'true' runs: using: 'composite' From 3594cb60bc03ade264236c889c2d8b33cb8e02db Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 16 Jul 2025 14:45:07 -0500 Subject: [PATCH 56/59] act --- .github/actions/configure-keystore/action.yml | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml index ee6b4ea3..d7795aaf 100644 --- a/.github/actions/configure-keystore/action.yml +++ b/.github/actions/configure-keystore/action.yml @@ -1,5 +1,6 @@ name: "Configure Keystore" description: "Assume an AWS role and fetch a secret into environment variables" + inputs: aws-role-to-assume: description: "The AWS IAM role to assume" @@ -13,10 +14,33 @@ inputs: platform: description: "The platform for which the keystore is being configured (e.g., ios, android)" required: true + environment: + description: "The environment for which the keystore is being configured (e.g., qa, flask, main)" + required: true runs: using: "composite" steps: + - name: Determine signing secret name + shell: bash + run: | + case "${{ inputs.environment }}" in + qa) + SECRET_NAME="metamask-mobile-qa-signing-certificates" + ;; + flask) + SECRET_NAME="metamask-mobile-flask-signing-certificates" + ;; + main) + SECRET_NAME="metamask-mobile-main-signing-certificates" + ;; + *) + echo "❌ Unknown environment: ${{ inputs.environment }}" + exit 1 + ;; + esac + echo "AWS_SIGNING_CERT_SECRET_NAME=$SECRET_NAME" >> "$GITHUB_ENV" + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -28,7 +52,7 @@ runs: run: | secret_json=$(aws secretsmanager get-secret-value \ --region "${{ inputs.aws-region }}" \ - --secret-id "${{ inputs.secret-name }}" \ + --secret-id "${AWS_SIGNING_CERT_SECRET_NAME}" \ --query SecretString \ --output text) @@ -36,5 +60,5 @@ runs: for key in $keys; do value=$(echo "$secret_json" | jq -r --arg k "$key" '.[$k]') echo "::add-mask::$value" - echo "$key=$value" >> "$GITHUB_ENV" + echo "$key=$(printf '%s' "$value")" >> "$GITHUB_ENV" done \ No newline at end of file From 68ab532683031a75e21d3b79bf7cd9c43993fac5 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 16 Jul 2025 23:28:43 -0500 Subject: [PATCH 57/59] --repo-update on pod install --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index fe444734..02c3ceb0 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -184,7 +184,7 @@ runs: # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} - run: bundle exec pod install + run: bundle exec pod install --repo-update working-directory: ios shell: bash From 5c4a3c0ae4db4269ab0fc31a344b645005d3c713 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 16 Jul 2025 23:33:20 -0500 Subject: [PATCH 58/59] keystore --- .github/actions/configure-keystore/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml index d7795aaf..14c5aa6d 100644 --- a/.github/actions/configure-keystore/action.yml +++ b/.github/actions/configure-keystore/action.yml @@ -61,4 +61,5 @@ runs: value=$(echo "$secret_json" | jq -r --arg k "$key" '.[$k]') echo "::add-mask::$value" echo "$key=$(printf '%s' "$value")" >> "$GITHUB_ENV" - done \ No newline at end of file + echo "✅ Set secret for key: $key" + done From 6a7e3cd9f7c10867a5dae2ee1bbf3045887c0a21 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 17 Jul 2025 00:22:36 -0500 Subject: [PATCH 59/59] android keystore configuration --- .github/actions/configure-keystore/action.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml index 14c5aa6d..00f51a9b 100644 --- a/.github/actions/configure-keystore/action.yml +++ b/.github/actions/configure-keystore/action.yml @@ -50,6 +50,7 @@ runs: - name: Fetch secret and export as environment variables shell: bash run: | + echo "🔐 Fetching secret from Secrets Manager..." secret_json=$(aws secretsmanager get-secret-value \ --region "${{ inputs.aws-region }}" \ --secret-id "${AWS_SIGNING_CERT_SECRET_NAME}" \ @@ -63,3 +64,19 @@ runs: echo "$key=$(printf '%s' "$value")" >> "$GITHUB_ENV" echo "✅ Set secret for key: $key" done + + - name: Configure Android Keystore + if: inputs.platform == 'android' + shell: bash + run: | + echo "📦 Configuring Android keystore..." + if [[ -z "$ANDROID_KEYSTORE" ]]; then + echo "⚠️ ANDROID_KEYSTORE is not set. Skipping keystore decoding." + exit 1 + fi + + # Use provided path if set, fallback to default + KEYSTORE_PATH="${ANDROID_KEYSTORE_PATH:-/tmp/android.keystore}" + echo "$ANDROID_KEYSTORE" | base64 --decode > "$KEYSTORE_PATH" + echo "✅ Android keystore written to $KEYSTORE_PATH" +