Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/build-ios-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,25 @@ jobs:
GOOGLE_SERVICES_B64_ANDROID: ${{ secrets.GOOGLE_SERVICES_B64_ANDROID }}
MM_INFURA_PROJECT_ID: ${{ secrets.MM_INFURA_PROJECT_ID }}

# Upload the iOS .app file that works in simulators
# Compress the .app bundle into a zip to preserve symlinks.
# actions/upload-artifact does NOT preserve symlinks — it follows them and
# uploads the targets as regular files. iOS .app bundles rely on symlinks
# (especially inside Frameworks/), and without them `simctl install` fails
# with "Unable to Install". The -y flag tells zip to store symlinks as-is.
- name: Compress iOS App to preserve symlinks
run: |
cd ios/build/Build/Products/Release-iphonesimulator/
zip -r -y MetaMask.app.zip MetaMask.app
echo "📦 Compressed app size: $(du -sh MetaMask.app.zip | cut -f1)"
echo "📦 Original app size: $(du -sh MetaMask.app | cut -f1)"

# Upload the zipped iOS .app file that works in simulators
- name: Upload iOS APP Artifact (Simulator)
id: upload-app
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-MetaMask.app
path: ios/build/Build/Products/Release-iphonesimulator/MetaMask.app
path: ios/build/Build/Products/Release-iphonesimulator/MetaMask.app.zip
retention-days: 7
if-no-files-found: error
continue-on-error: true
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/run-e2e-smoke-tests-ios-flask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ jobs:
- name: Setup Main iOS App artifacts
run: |
mkdir -p ios/build/Build/Products/Release-iphonesimulator/
cp -R artifacts/main-qa-MetaMask.app ios/build/Build/Products/Release-iphonesimulator/MetaMask.app
# The .app is uploaded as a zip to preserve symlinks (see build-ios-e2e.yml)
unzip -q artifacts/main-qa-MetaMask.app/MetaMask.app.zip -d artifacts/
cp -R artifacts/MetaMask.app ios/build/Build/Products/Release-iphonesimulator/MetaMask.app

- name: Repack Main iOS App
run: node scripts/repack.js
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/run-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
test-apk-target-path: ${{ steps.determine-target-paths.outputs.test-apk-target-path }}

env:
PREBUILT_IOS_APP_PATH: artifacts/${{ inputs.build_type }}-${{ inputs.metamask_environment }}-MetaMask.app
PREBUILT_IOS_APP_PATH: artifacts/MetaMask.app
METAMASK_ENVIRONMENT: ${{ inputs.metamask_environment }}
METAMASK_BUILD_TYPE: ${{ inputs.build_type }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -186,6 +186,24 @@ jobs:
with:
path: artifacts/

# The iOS .app is uploaded as a zip to preserve symlinks (see build-ios-e2e.yml).
# Extract it here so Detox can find the .app bundle at PREBUILT_IOS_APP_PATH.
- name: Extract iOS App from artifact
if: ${{ inputs.platform == 'ios' }}
run: |
ARTIFACT_DIR="artifacts/${{ inputs.build_type }}-${{ inputs.metamask_environment }}-MetaMask.app"
if [ ! -f "$ARTIFACT_DIR/MetaMask.app.zip" ]; then
echo "❌ Error: MetaMask.app.zip not found in $ARTIFACT_DIR"
echo "Contents of artifacts/:"
ls -la artifacts/ || true
echo "Contents of $ARTIFACT_DIR/:"
ls -la "$ARTIFACT_DIR/" || true
exit 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flask iOS artifact format mismatch

High Severity

Extract iOS App from artifact now requires MetaMask.app.zip inside artifacts/${{ inputs.build_type }}-${{ inputs.metamask_environment }}-MetaMask.app, but the Flask repack pipeline still uploads flask-e2e-MetaMask.app as an uncompressed .app directory. The new file check exits early, so Flask iOS smoke jobs fail before Detox starts.

Fix in Cursor Fix in Web

fi
unzip -q "$ARTIFACT_DIR/MetaMask.app.zip" -d artifacts/
echo "✅ iOS app extracted to artifacts/MetaMask.app"
echo "📦 App size: $(du -sh artifacts/MetaMask.app | cut -f1)"

# On re-run (run_attempt > 1), download previous test results to identify failed tests
- name: Download previous test results (on re-run)
if: ${{ github.run_attempt > 1 }}
Expand Down
Loading