-
-
Notifications
You must be signed in to change notification settings - Fork 3
E2e env actions #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
E2e env actions #85
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: SDK Setup Redundancy and API Level Inconsistency
The Android SDK setup in the setup-e2e-env
action contains redundant steps and an inconsistency. Android SDK packages (platform-tools, platforms, build-tools, emulator, system-images) and licenses are installed/accepted twice. Additionally, the first SDK package installation step hardcodes "android-34" for system images, ignoring the configurable android-api-level
input, unlike the second installation step which correctly uses it. This duplication and inconsistency are inefficient and could lead to conflicts or incorrect configurations.
.github/actions/setup-e2e-env/action.yml#L236-L280
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 236 to 280 in 860e85f
- name: Install Android SDK packages | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "Accepting SDK licenses..." | |
printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses | |
echo "Installing Android SDK components..." | |
"${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-34;google_apis;${{ inputs.android-abi }}" \ | |
echo "Updating SDK packages..." | |
"${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update | |
shell: bash | |
## NDK Setup | |
- name: Debug Android SDK Paths | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "ANDROID_HOME: $ANDROID_HOME" | |
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 |
Bug: Emulator Command Hangs GitHub Actions
The Android emulator launch command runs in the foreground, causing the GitHub Action to hang indefinitely and preventing subsequent steps (e.g., waiting for the emulator to boot) from executing. The command needs to be backgrounded using &
.
.github/actions/setup-e2e-env/action.yml#L341-L346
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 341 to 346 in 860e85f
# Launch Android Emulator | |
- 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 | |
shell: bash |
Bug: Redundant Android System Image Installation
The Android system image is redundantly installed three times during the E2E environment setup for Android. This unnecessary repetition is wasteful and could lead to timing or caching issues.
.github/actions/setup-e2e-env/action.yml#L307-L314
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 307 to 314 in 860e85f
- name: Install Android system image | |
if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} | |
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 |
Bug: Android Setup Fails on Non-x86_64 Linux
The Android setup in the action has two issues:
- The NDK toolchain path is hardcoded to
linux-x86_64
, which prevents the NDK toolchain from being correctly added to PATH on non-x86_64 Linux or other OS architectures. - It inconsistently uses
ANDROID_HOME
andANDROID_SDK_ROOT
for Android SDK paths, potentially causing path resolution issues.
.github/actions/setup-e2e-env/action.yml#L298-L301
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 298 to 301 in 860e85f
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" |
Bug: CocoaPods Required for iOS Builds
CocoaPods installation and cache restoration are conditionally executed only when the setup-simulator
input is true
. However, CocoaPods is required for iOS app building regardless of simulator setup, causing iOS builds to fail when setup-simulator
is false
.
.github/actions/setup-e2e-env/action.yml#L171-L186
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 171 to 186 in 860e85f
# Restore CocoaPods cache | |
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install | |
working-directory: ios | |
shell: bash |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Android SDK Setup Issues
The Android SDK setup contains several issues:
- Duplicate installations: Android SDK packages and licenses are installed and accepted twice.
- Inconsistent API level: The initial SDK installation step hardcodes API level "34" for system images, ignoring the configurable
android-api-level
input, unlike subsequent installation steps. - Dead code: A commented-out step for installing emulator dependencies is present.
.github/actions/setup-e2e-env/action.yml#L229-L280
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 229 to 280 in 032380e
# - 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: | | |
echo "Accepting SDK licenses..." | |
printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses | |
echo "Installing Android SDK components..." | |
"${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-34;google_apis;${{ inputs.android-abi }}" \ | |
echo "Updating SDK packages..." | |
"${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update | |
shell: bash | |
## NDK Setup | |
- name: Debug Android SDK Paths | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "ANDROID_HOME: $ANDROID_HOME" | |
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 |
Bug: Emulator Launch Blocks Workflow
The Android emulator is launched in the foreground without backgrounding it (missing &
at the end), which causes the workflow to hang indefinitely and prevents the subsequent "Wait for Android Emulator to Boot" step from executing.
.github/actions/setup-e2e-env/action.yml#L344-L346
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 344 to 346 in 032380e
run: | | |
"$ANDROID_HOME/emulator/emulator" -avd "${{ inputs.android-avd-name }}" -no-audio -no-boot-anim -no-window -verbose | |
shell: bash |
Bug: NDK Path and OS Architecture Issues
The NDK toolchain path setup is incorrect: it inconsistently uses ANDROID_SDK_ROOT
instead of ANDROID_HOME
(used elsewhere in the action), which can cause path resolution issues. Furthermore, it hardcodes the OS architecture as linux-x86_64
, leading to failures on macOS runners which require darwin-x86_64
.
.github/actions/setup-e2e-env/action.yml#L298-L301
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 298 to 301 in 032380e
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" |
Bug: CocoaPods Installation Fails Without Simulator Setup
CocoaPods cache and installation are only executed when setup-simulator
is true
, but CocoaPods is required for building iOS apps regardless of whether a simulator is needed. This will cause iOS builds to fail when setup-simulator
is false.
.github/actions/setup-e2e-env/action.yml#L171-L186
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 171 to 186 in 032380e
# Restore CocoaPods cache | |
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install | |
working-directory: ios | |
shell: bash |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: E2E Setup: Redundant SDK Installations, Hardcoded API Levels
The Android E2E environment setup contains redundant and inconsistent steps:
- Duplicate SDK Installation: Android SDK packages (platform-tools, platforms, build-tools, emulator, system-images) and licenses are installed and accepted twice, causing inefficiency and potential conflicts.
- Hardcoded API Level: The Android system image is installed three times. One of these installations hardcodes "android-34", ignoring the configurable
android-api-level
input parameter used in other installations. - Stale Code: Unnecessary commented-out code for Android emulator dependencies is present and should be removed.
.github/actions/setup-e2e-env/action.yml#L229-L313
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 229 to 313 in eea10a6
# - 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: | | |
echo "Accepting SDK licenses..." | |
printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses | |
echo "Installing Android SDK components..." | |
"${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-34;google_apis;${{ inputs.android-abi }}" \ | |
echo "Updating SDK packages..." | |
"${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update | |
shell: bash | |
## NDK Setup | |
- name: Debug Android SDK Paths | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "ANDROID_HOME: $ANDROID_HOME" | |
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: | | |
"$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 | |
- 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 | |
## Launch AVD | |
## 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;${{ inputs.android-abi }}" | |
echo "Installing system image: $IMAGE" | |
"${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" |
Bug: NDK Toolchain Path Issue on macOS
The NDK toolchain path is hardcoded to linux-x86_64
, which is incorrect for macOS runners (should be darwin-x86_64
), making NDK tools unavailable on those platforms. Additionally, inconsistent use of ANDROID_HOME
and ANDROID_SDK_ROOT
for Android SDK paths could lead to incorrect NDK toolchain resolution. A duplicate "## Launch AVD" comment is also present.
.github/actions/setup-e2e-env/action.yml#L298-L307
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 298 to 307 in eea10a6
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 | |
## Launch AVD | |
## Launch AVD | |
Bug: Redundant Android System Image Installations
Multiple redundant installations of the Android system image occur: once during general SDK setup, a second time during a subsequent SDK package installation step, and a third time specifically for AVD setup. Additionally, the comment "## Launch AVD" is duplicated.
.github/actions/setup-e2e-env/action.yml#L305-L314
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 305 to 314 in eea10a6
## 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;${{ inputs.android-abi }}" | |
echo "Installing system image: $IMAGE" | |
"${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" | |
shell: bash |
Bug: CocoaPods Cache Issues in iOS Builds
The CocoaPods cache restoration and installation steps for iOS are incorrectly conditional on setup-simulator
being true
. These steps are required for iOS app building regardless of whether a simulator is being set up.
.github/actions/setup-e2e-env/action.yml#L171-L186
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 171 to 186 in eea10a6
# Restore CocoaPods cache | |
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install | |
working-directory: ios | |
shell: bash |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: SDK Setup Redundancy Causes API Level Inconsistency
The Android SDK setup contains duplicate logic for accepting licenses and installing SDK packages. One block redundantly performs these actions and hardcodes the Android API level to '34' for system images, ignoring the inputs.android-api-level
parameter. The other block correctly uses the configurable API level, making the first block unnecessary and causing inconsistent API level application.
.github/actions/setup-e2e-env/action.yml#L235-L279
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 235 to 279 in 1a08796
- name: Install Android SDK packages | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "Accepting SDK licenses..." | |
printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses | |
echo "Installing Android SDK components..." | |
"${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-34;google_apis;${{ inputs.android-abi }}" \ | |
echo "Updating SDK packages..." | |
"${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update | |
shell: bash | |
## NDK Setup | |
- name: Debug Android SDK Paths | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "ANDROID_HOME: $ANDROID_HOME" | |
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 |
Bug: Android Setup Path Issues
The Android setup contains several issues:
- Inconsistent use of
$ANDROID_SDK_ROOT
for NDK paths instead of$ANDROID_HOME
, which is used elsewhere, potentially causing path resolution issues. - The NDK toolchain path hardcodes
linux-x86_64
for prebuilt binaries, which is incorrect for macOS runners and other non-x86_64 architectures. - A duplicate '## Launch AVD' comment is present.
.github/actions/setup-e2e-env/action.yml#L297-L305
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 297 to 305 in 1a08796
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 | |
## Launch AVD | |
## Launch AVD |
Bug: CocoaPods Installation Fails Without Simulator Setup
CocoaPods cache restoration and installation are incorrectly conditional on inputs.setup-simulator
being true. CocoaPods is required for building iOS project dependencies regardless of simulator setup, causing build failures when setup-simulator
is false for iOS builds.
.github/actions/setup-e2e-env/action.yml#L171-L185
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 171 to 185 in 1a08796
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install | |
working-directory: ios | |
shell: bash |
Bug: Android SDK Installs System Image Multiple Times
The Android system image is redundantly installed three times: twice during the Android SDK package installations and a third time in the dedicated 'Install Android system image' step. This leads to unnecessary duplication.
.github/actions/setup-e2e-env/action.yml#L306-L313
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 306 to 313 in 1a08796
- name: Install Android system image | |
if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} | |
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 |
Bug: Redundant SDK License Acceptance
The Android SDK licenses are accepted redundantly. They are accepted once during the SDK package installation and again in a separate, dedicated step.
.github/actions/setup-e2e-env/action.yml#L262-L268
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 262 to 268 in 1a08796
- 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 |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Redundant Android SDK Setup Causes Inconsistency
The Android SDK setup in the setup-e2e-env
action is redundant and inconsistent. Android SDK licenses are accepted, and SDK packages and system images are installed multiple times. The initial system image installation also hardcodes API level 34, ignoring the configurable inputs.android-api-level
input used in subsequent installations.
.github/actions/setup-e2e-env/action.yml#L235-L311
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 235 to 311 in 367c013
- name: Install Android SDK packages | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "Accepting SDK licenses..." | |
printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses | |
echo "Installing Android SDK components..." | |
"${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-34;google_apis;${{ inputs.android-abi }}" \ | |
echo "Updating SDK packages..." | |
"${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update | |
shell: bash | |
## NDK Setup | |
- name: Debug Android SDK Paths | |
if: ${{ inputs.platform == 'android' }} | |
run: | | |
echo "ANDROID_HOME: $ANDROID_HOME" | |
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: | | |
"$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 | |
- 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 | |
## 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 |
Bug: NDK Toolchain Path Incorrect on macOS
The NDK toolchain path is hardcoded to linux-x86_64
in the Add NDK related toolchains to PATH
step. This prevents NDK tools from being found on macOS runners, where the path should be darwin-x86_64
(or darwin-arm64
).
.github/actions/setup-e2e-env/action.yml#L297-L298
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 297 to 298 in 367c013
run: | | |
NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" |
Bug: CocoaPods Setup Ignored When Simulator Not Set Up
CocoaPods cache and installation steps are incorrectly conditional on the setup-simulator
input being true. This prevents CocoaPods from being set up when setup-simulator
is false, despite being generally required for building iOS applications, potentially causing build failures.
.github/actions/setup-e2e-env/action.yml#L170-L185
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 170 to 185 in 367c013
# Restore CocoaPods cache | |
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install | |
working-directory: ios | |
shell: bash |
Was this report helpful? Give feedback by reacting with 👍 or 👎
* feat(INFRA-2766): update for ubuntu runners * feat(INFRA-2766): remove ios references not used * feat(INFRA-2766): pwetty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: CocoaPods Installation Fails on iOS Builds
CocoaPods cache restoration and installation are incorrectly conditional on inputs.setup-simulator == 'true'
. As CocoaPods is essential for building iOS apps regardless of simulator setup, these steps should only be conditional on inputs.platform == 'ios'
, otherwise iOS builds may fail.
.github/actions/setup-e2e-env/action.yml#L171-L185
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 171 to 185 in d7a349b
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install | |
working-directory: ios | |
shell: bash |
Bug: NDK Path Issue and YAML Syntax Errors
The NDK toolchain path is hardcoded to linux-x86_64
, which is incorrect for macOS runners and causes Android builds to fail. This path should dynamically adapt to the runner's OS. Additionally, certain if
conditions for Android setup steps (e.g., Set ANDROID_AVD_HOME for downstream steps
and Create Android Virtual Device (AVD)
) are missing a space before the closing braces, leading to YAML parsing errors.
.github/actions/setup-e2e-env/action.yml#L287-L296
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 287 to 296 in d7a349b
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 | |
## Launch AVD | |
- name: Set ANDROID_AVD_HOME for downstream steps | |
if: ${{ inputs.platform == 'android'}} |
Was this report helpful? Give feedback by reacting with 👍 or 👎
* keystore-actions * act * --repo-update on pod install * keystore * android keystore configuration * ios signing * keystores * ios-crypto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: NDK Toolchain Path Incorrect for macOS
The NDK toolchain path is hardcoded to linux-x86_64
in the 'Add NDK related toolchains to PATH' step. This step lacks an OS restriction and will fail on macOS runners, where the correct path should be darwin-x86_64
.
.github/actions/setup-e2e-env/action.yml#L288-L295
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 288 to 295 in 4459e30
- 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 |
Bug: CocoaPods Setup Fails in iOS Builds
The Setup E2E Test Environment
action incorrectly makes CocoaPods cache restoration and installation conditional on inputs.setup-simulator == 'true'
. This prevents iOS builds when setup-simulator
is false
, as CocoaPods dependencies are required for iOS builds regardless of simulator setup.
.github/actions/setup-e2e-env/action.yml#L175-L189
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 175 to 189 in 4459e30
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install --repo-update | |
working-directory: ios | |
shell: bash |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: NDK Toolchain Path Not OS-Agnostic
The NDK toolchain path is hardcoded to linux-x86_64
. This prevents NDK tools from being found on GitHub runners with different operating systems (e.g., macOS, which requires darwin-x86_64
) or architectures (e.g., arm64 Linux). The path should dynamically determine the runner's OS and architecture.
.github/actions/setup-e2e-env/action.yml#L313-L314
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 313 to 314 in 4ee8ff1
run: | | |
NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" |
Bug: Redundant Secret Name Input
The secret-name
input is marked as required but is never used by the action. The secret name is instead dynamically determined based on the environment
input. This makes the secret-name
input redundant and potentially confusing, and it should either be removed or utilized.
.github/actions/configure-keystore/action.yml#L10-L13
github-tools/.github/actions/configure-keystore/action.yml
Lines 10 to 13 in 4ee8ff1
required: true | |
secret-name: | |
description: 'The name of the secret in AWS Secrets Manager' | |
required: true |
Bug: GitHub Action References External Instead of Local
The setup-e2e-env
GitHub Action incorrectly references the configure-keystore
action via an external repository path (MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions
), when it is defined locally within the same repository at .github/actions/configure-keystore/action.yml
. This causes the action to fail; it should reference the local path.
.github/actions/setup-e2e-env/action.yml#L135-L141
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 135 to 141 in 4ee8ff1
if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} | |
uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions | |
with: | |
aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' | |
aws-region: 'us-east-2' | |
platform: 'ios' | |
environment: ${{ inputs.environment }} |
.github/actions/setup-e2e-env/action.yml#L245-L251
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 245 to 251 in 4ee8ff1
if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} | |
uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions | |
with: | |
aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' | |
aws-region: 'us-east-2' | |
platform: 'android' | |
environment: ${{ inputs.environment }} |
Bug: CocoaPods Installation Fails When Simulator Setup Skipped
CocoaPods cache restoration and installation for iOS builds are incorrectly conditioned on the setup-simulator
input. This causes build failures when setup-simulator
is false, as CocoaPods are a general requirement for iOS builds.
.github/actions/setup-e2e-env/action.yml#L187-L199
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 187 to 199 in 4ee8ff1
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install --repo-update |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: NDK Toolchain Path Incorrect for macOS
The setup-e2e-env
action hardcodes linux-x86_64
in the NDK toolchain path. This causes Android builds to fail on non-Linux runners, such as macOS, where the correct path should be darwin-x86_64
.
.github/actions/setup-e2e-env/action.yml#L317-L318
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 317 to 318 in aa884d6
run: | | |
NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: NDK Path Error on macOS
The setup-e2e-env
action hardcodes the NDK toolchain path to linux-x86_64
within its Android setup steps. This prevents Android builds from succeeding on macOS runners, where the correct path is darwin-x86_64
, resulting in NDK tools not being found in the PATH.
.github/actions/setup-e2e-env/action.yml#L322-L323
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 322 to 323 in a4d8ac3
run: | | |
NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" |
Bug: CocoaPods Installation Fails Without Simulator Setup
CocoaPods cache restoration and installation steps are incorrectly conditioned on setup-simulator == 'true'
. CocoaPods is essential for iOS builds to manage dependencies, even when a simulator is not being set up, which can lead to build failures.
.github/actions/setup-e2e-env/action.yml#L196-L210
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 196 to 210 in a4d8ac3
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} | |
run: bundle exec pod install --repo-update | |
working-directory: ios | |
shell: bash |
Was this report helpful? Give feedback by reacting with 👍 or 👎
* feat(INFRA-2766): test simulator configs * feat(INFRA-2766): remove boot * feat(INFRA-2766): list ios emuls * feat(INFRA-2766): test * feat(INFRA-2766): remove boot stuff for commented * feat(INFRA-2766): add kvm stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: NDK Toolchain Path Issue on macOS
The NDK toolchain path hardcodes linux-x86_64
. This prevents NDK tools from being found on macOS runners (where darwin-x86_64
is expected) and other non-Linux or ARM-based systems, making Android builds fail.
.github/actions/setup-e2e-env/action.yml#L304-L305
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 304 to 305 in a3cd1cb
run: | | |
NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" |
Bug: Unused Required Parameter Causes Confusion
The secret-name
input is defined as required but is never used. The action instead dynamically determines the secret name based on the environment
input, making this required parameter redundant and potentially confusing.
.github/actions/configure-keystore/action.yml#L10-L13
github-tools/.github/actions/configure-keystore/action.yml
Lines 10 to 13 in a3cd1cb
required: true | |
secret-name: | |
description: 'The name of the secret in AWS Secrets Manager' | |
required: true |
Bug: Incorrect Action Path in Workflow
The setup-e2e-env
action incorrectly references MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions
for iOS and Android keystore configuration. The configure-keystore
action is being added to the current repository in this commit, not to MetaMask/github-tools
. This will cause the workflow to fail as the action is not found at the remote path. The reference should be a relative path, such as ./actions/configure-keystore
.
.github/actions/setup-e2e-env/action.yml#L139-L140
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 139 to 140 in a3cd1cb
if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} | |
uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions |
.github/actions/setup-e2e-env/action.yml#L228-L229
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 228 to 229 in a3cd1cb
if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} | |
uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions |
Bug: CocoaPods Installation Fails Without Simulator Setup
CocoaPods cache restoration and installation steps are incorrectly conditioned to run only when setup-simulator
is true. As CocoaPods are typically required for iOS builds regardless of simulator setup, this prevents necessary dependencies from being installed when setup-simulator
is false, potentially breaking iOS builds.
.github/actions/setup-e2e-env/action.yml#L191-L202
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 191 to 202 in a3cd1cb
- 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 }}- | |
# Install CocoaPods w/ cached bundler environment | |
- name: Install CocoaPods via bundler | |
if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Redundant Secret Name Input
The secret-name
input is defined as required but is never used. The action dynamically determines the secret name based on the environment
input, making the secret-name
input redundant and potentially confusing.
.github/actions/configure-keystore/action.yml#L10-L13
github-tools/.github/actions/configure-keystore/action.yml
Lines 10 to 13 in b748908
required: true | |
secret-name: | |
description: 'The name of the secret in AWS Secrets Manager' | |
required: true |
Bug: NDK Path Error on macOS
The NDK toolchain path in the Add NDK related toolchains to PATH
step is hardcoded to linux-x86_64
. This is incorrect for macOS runners, where the path should be darwin-x86_64
, preventing NDK tools from being found and causing failures.
.github/actions/setup-e2e-env/action.yml#L304-L305
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 304 to 305 in b748908
run: | | |
NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" |
Was this report helpful? Give feedback by reacting with 👍 or 👎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: NDK Toolchain Path Not OS/Arch Agnostic
The NDK toolchain path is hardcoded to linux-x86_64
. This causes failures on non-Linux runners (e.g., macOS, which requires darwin-x86_64
) and other architectures (e.g., ARM64 Linux), as the path is incorrect. The path should be dynamically determined based on the runner's operating system and architecture.
.github/actions/setup-e2e-env/action.yml#L304-L305
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 304 to 305 in deb9e28
run: | | |
NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" |
Bug: Unused Required Input Causes Interface Confusion
The secret-name
input is defined as required but is never used by the action. Instead, the secret name is dynamically determined based on the environment
input, making the action's interface misleading.
.github/actions/configure-keystore/action.yml#L10-L13
github-tools/.github/actions/configure-keystore/action.yml
Lines 10 to 13 in deb9e28
required: true | |
secret-name: | |
description: 'The name of the secret in AWS Secrets Manager' | |
required: true |
Bug: Local Action Path Mismatch
The setup-e2e-env
action incorrectly references the configure-keystore
action using an external repository path (MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions
). However, the configure-keystore
action is defined locally within this repository at .github/actions/configure-keystore/action.yml
. This path mismatch will cause both the iOS and Android keystore configuration steps to fail.
.github/actions/setup-e2e-env/action.yml#L139-L140
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 139 to 140 in deb9e28
if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} | |
uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions |
.github/actions/setup-e2e-env/action.yml#L228-L229
github-tools/.github/actions/setup-e2e-env/action.yml
Lines 228 to 229 in deb9e28
if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} | |
uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions |
Was this report helpful? Give feedback by reacting with 👍 or 👎
🚀 Introduce Reusable E2E Environment Setup GitHub Action
📂 What’s new
This PR introduces a reusable composite GitHub Action at
.github/actions/setup-e2e-env
designed to standardize and streamline the setup of E2E test environments across iOS and Android platforms.✅ Features
🧰 Common Tooling Setup
node-version
input)yarn-version
via Corepack)foundryup
)node_modules
(Yarn)vendor/bundle
)Pods/
)🍎 iOS Platform Support (
platform: ios
)ruby-version
)bundler-version
) and gem resolution viabundle install
xcode-version
)bundle exec pod install
setup-simulator
)ios-simulator-device
🤖 Android Platform Support (
platform: android
)jdk-version
andjdk-distribution
)platform-tools
,build-tools
, emulator, system imagesndk-version
)apt
platform-tools
,emulator
,cmdline-tools
)🧪 Testing
Verified on:
macos-14
andmacos-14-large
runnersExample usage:
📥 Inputs
platform
ios
orandroid
(required)node-version
20.18.0
)yarn-version
1.22.22
)setup-simulator
false
)ios-device
"iPhone 15"
)bundler-version
2.5.8
)cache-prefix
e2e
)ruby-version
3.1
)xcode-version
16.2
)jdk-version
17
)jdk-distribution
temurin
)ndk-version
26.1.10909125
)foundry-version
v1.2.3
)android-device
android-api-level
34
)android-abi
x86_64
)📌 Notes
platform: android
and vice versa.PATH
for CLI-based native tools likeclang
orndk-build
.NODE_OPTIONS=--max-old-space-size=4096
.