Skip to content

Conversation

@alucardzom
Copy link
Contributor

@alucardzom alucardzom commented Jul 25, 2025

Description

This PR introduces GitHub Actions workflows for testing iOS and Android QA app builds, providing automated build testing and artifact management capabilities similar to our existing Bitrise workflows.

Workflow Triggers
Workflow Trigger Type When It Runs
iOS Build workflow_dispatch Manually from GitHub Actions UI with custom inputs
Android Build workflow_dispatch Manually from GitHub Actions UI with custom inputs
Workflow Inputs
Workflow Input Name Description Type Required Default
iOS Build retention_days Number of days to retain the uploaded artifacts string ❌ No '7'
Android Build retention_days Number of days to retain artifacts string ❌ No '7'
Workflow Triggers
Workflow Trigger Type When It Runs
iOS Build workflow_dispatch Manually from GitHub Actions UI with custom inputs
Android Build workflow_dispatch Manually from GitHub Actions UI with custom inputs

Key Features

  • ✅ iOS QA Build Testing: Automated simulator builds with comprehensive artifact uploads (.app, .ipa, .xcarchive, source maps)
  • ✅ Android QA Build Testing: Automated APK and AAB bundle generation with artifact uploads
  • ✅ Manual Workflow Triggers: Workflows can be executed manually from GitHub Actions UI on any branch
  • ✅ Configurable Artifact Retention: Customizable artifact retention period with descriptive input (default: 7 days)
  • ✅ Optimized CI Setup: Enhanced setup.mjs script with GitHub CI optimizations
  • ✅ Comprehensive Artifact Collection: Uploads apps, archives, source maps with detailed status reporting
  • ✅ Graceful Error Handling: Continues workflow execution even if optional artifacts fail
  • ✅ Step-by-Step Documentation: Clear comments explain each workflow step's purpose

Added

  • New GitHub Actions workflow: .github/workflows/test-ios-build-app.yml
    • Builds iOS QA app for simulator (MetaMask-QA.app)
    • Attempts to upload device artifacts (.ipa, .xcarchive) when available
    • Collects iOS source maps for debugging
  • New GitHub Actions workflow: .github/workflows/test-android-build-app.yml
    • Builds Android QA APK for device installation
    • Generates Android App Bundle (AAB) for distribution
    • Collects Android source maps for crash tracking
  • Manual workflow dispatch triggers with configurable artifact retention period
  • Comprehensive artifact upload capabilities with detailed status reporting
  • Workflow outputs for artifact URLs and upload status tracking
  • Inline comments documenting each workflow step's purpose

Changed

  • Updated scripts/setup.mjs to optimize for GitHub CI environments
  • Added GITHUB_CI flag support for conditional setup steps in PPOM build
  • Enhanced PPOM build process with optional clean/install steps in CI
  • Modified setup script to skip unnecessary operations in CI environments
  • Improved memory allocation for GitHub runners with NODE_OPTIONS=--max_old_space_size=4096

Changelog

CHANGELOG entry: null

Related issues

Manual testing steps

Prerequisites

  • Ensure you have necessary GitHub secrets configured:
    • SEGMENT_WRITE_KEY_QA, SEGMENT_PROXY_URL_QA, SEGMENT_DELETE_API_SOURCE_ID_QA
    • MM_SENTRY_DSN_TEST, MM_SENTRY_AUTH_TOKEN
    • GOOGLE_SERVICES_B64_IOS, GOOGLE_SERVICES_B64_ANDROID
    • OAuth client IDs for testing environments

Testing iOS Workflow

  • Navigate to Actions tab → Test iOS Build QA App
  • Click Run workflow button
  • Configure workflow inputs:
  • Branch: Select your desired branch
  • Retention days: Enter number of days to retain artifacts (e.g., "14" for 2 weeks)
  • Click Run workflow and monitor execution progress
  • Verify the following steps were completed successfully:
    • ✅ iOS environment setup and tool installation
    • ✅ Project setup and dependency installation
    • ✅ iOS QA app build for simulator
    • ✅ Artifact uploads (APP will succeed, IPA/Archive may skip without certificates)
  • Download artifacts from the workflow run summary page
  • Test the downloaded MetaMask-QA.app file in iOS Simulator

Testing Android Workflow

  • Navigate to Actions tab → Test Android Build QA App
  • Click the Run workflow button
  • Configure workflow inputs (branch and retention period)
  • Monitor build execution and verify these steps:
    • ✅ Android SDK and environment setup
    • ✅ Project setup and dependency installation
    • ✅ Android QA APK and AAB bundle generation
    • ✅ All artifact uploads (APK, AAB, source map)
  • Download artifacts from the workflow summary
  • Install and test the app-qa-release.apk file on an Android device/emulator
  • Optionally, validate the AAB bundle for distribution compatibility

Screenshots/Recordings

Android Build and Upload
image

iOS Build and Upload
image

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence, such as recordings and or screenshots.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-dev-ops DevOps team label Jul 25, 2025
@alucardzom alucardzom added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Jul 29, 2025

# Install Android SDK, Node.js, and other Android development dependencies
- name: Installing Android Environment Setup
uses: MetaMask/github-tools/.github/actions/setup-e2e-env@e2e-env-actions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This must be updated once MetaMask/github-tools#85 is merged.

name: Test Android Build QA App

on:
push:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be removed, added for testing into this branch

name: Test iOS Build QA App

on:
push:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be removed, added for testing into this branch

@makemesteaks makemesteaks force-pushed the ale/improve-qa-build-apps-job branch from 71fb897 to 789052a Compare July 30, 2025 14:26
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@makemesteaks makemesteaks enabled auto-merge August 7, 2025 12:27
@makemesteaks makemesteaks added the No QA Needed Apply this label when your PR does not need any QA effort. label Aug 7, 2025
@makemesteaks makemesteaks disabled auto-merge August 7, 2025 12:29
@makemesteaks makemesteaks enabled auto-merge August 7, 2025 12:29
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 7, 2025

@makemesteaks makemesteaks added this pull request to the merge queue Aug 7, 2025
Merged via the queue into main with commit f24051a Aug 7, 2025
55 of 64 checks passed
@makemesteaks makemesteaks deleted the ale/improve-qa-build-apps-job branch August 7, 2025 13:26
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Hi @alucardzom,

on the day following feat or perf PR merge, PM and author to test changes on main (feature + exploratory around the edges) using the latest nightly build with casual user persona and also a power user persona where performance might be a challenge. Please record the testing in a video, check the relevant post-merge checklist box below, and post the video in a comment at the bottom of this PR.

Author validation checklist

  • Validated the changes in main branch using the nightly build
  • Video shared

PM validation checklist

  • Validated the changes in main branch using the nightly build
  • Video shared

@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2025
@github-actions github-actions bot added the needs-validation Post merge validation label Aug 7, 2025
@metamaskbot metamaskbot added the release-7.54.0 Issue or pull request that will be included in release 7.54.0 label Aug 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-validation Post merge validation No QA Needed Apply this label when your PR does not need any QA effort. no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.54.0 Issue or pull request that will be included in release 7.54.0 team-dev-ops DevOps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants