Skip to content

ci(e2e-test-stack): run mobile's Android Detox suite too, from its build artifact - #48

Merged
saturninoabril merged 4 commits into
masterfrom
e2e-test-stack-mobile-android
Nov 19, 2026
Merged

saturninoabril merged 4 commits into
masterfrom
e2e-test-stack-mobile-android

Conversation

@saturninoabril

@saturninoabril saturninoabril commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Phase C of the Mobile E2E Server Migration to E2E Test Stack plan, started early: mattermost-mobile's Android Detox suite on stack servers, the same way as iOS. No Android build here: like iOS, the run takes mobile's own build artifact by its link, so no keystore, private repository or larger build runner is needed.

e2e-test-stack-mobile-ios.yml → e2e-test-stack-mobile.yml ("E2E Test Stack - Mobile", by hand)

  • build_artifact (was ios_build_artifact): an ios-build-simulator-* or android-build-files-* link; its name picks the platform and device (iPhone 17 Pro / iOS 26.2, or detox_pixel_8 / API 35, as mobile's templates).
  • resolve now reads the commit the build job built (MOBILE_VERSION) from its checkout log, and refuses a run whose build differs from its head: the tests run from the app's commit, and the fork check applies to that commit (also for iOS).
  • app: iOS as before; for Android, only app-debug.apk and app-debug-androidTest.apk are copied from mobile's 1.16 GB artifact.
  • shard-ios / shard-android: one runs, for the platform. logs, destroy and report take whichever ran; the report reads <platform>-results-*.
  • android_runner (default ubuntu-24.04): ubuntu-latest-8-cores, mobile's runner, if this repository may use it.

e2e-test-stack-mobile-android-shard.yml (new): the iOS shard's open, assign and provision steps, then mobile's Android test steps copied from its e2e-android-template.yml (KVM, SDK and emulator caches, run_android_ci_shard.sh with its own retries, result uploads with retries), APKs from this run, TSIO and S3 left out. The Detox step times out at 180 minutes inside a 210-minute job, so a slow shard fails (results uploaded, batch kept for a re-run) instead of being cancelled.

Also: the destroy workflow by hand accepts runs of the renamed file; the push-triggered runs skip e2e-test-stack-mobile*.yml; README updated. Merged master (with #47's report fix, applied here for both platforms).

Test plan

  • yamllint, actionlint, Prettier, ESLint, tsc clean
  • Code and security review; findings fixed (Android step/job timeouts; the built commit checked in resolve)
  • resolve locally on mobile run 44410177865: the iOS link → ios, the Android link (artifact 14479131383) → android, both at 13407ac, which the build jobs' logs confirm; a mismatched build is refused
  • After merge: an Android run by hand with spec_files = account and autocomplete
  • An iOS run on the renamed workflow, to confirm iOS is unchanged

Change Impact: 🟡 Medium

Changes Breakdown:

+620 -56 Production Changes (100%)
+0 -0 Test Changes (0%)

Regression Risk: The changes restructure the mobile E2E CI workflows, the manual destroy workflow, and the push trigger filters. A defect would affect CI test runs and retained server cleanup, not product runtime; the new 460-line Android shard workflow has no completed run yet.

Generated by CodeRabbitAI

…path, and add a spec_files input

download-artifact extracts a single matching artifact into the path itself, not a folder named for it, so the report of a one-shard run found no results and failed though the shard passed (run 44446198663: 28 passed, 1 skipped, 0 failed). spec_files picks spec files under search_path, passed to mobile's splitter.
…ild artifact

e2e-test-stack-mobile-ios.yml becomes e2e-test-stack-mobile.yml: the build_artifact link (ios-build-simulator-* or android-build-files-*) picks the platform and device. For Android, only the app and test APKs are copied into the run, and e2e-test-stack-mobile-android-shard.yml runs mobile's Android test steps on an emulator, on its own server like the iOS shards; android_runner picks the runner (ubuntu-24.04 by default). The Detox step times out at 180 minutes inside a 210-minute job, so a slow shard keeps its batch for a re-run.

resolve reads the commit the build job built from its checkout log and refuses a run whose build differs from its head, so the tests run from the app's commit and the fork check applies to it.
…le-android

# Conflicts:
#	.github/workflows/e2e-test-stack-mobile.yml
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The mobile E2E workflow now accepts iOS or Android build-artifact links. It resolves the platform and device settings, prepares the matching build artifacts, and runs the corresponding shard workflow. Android shards use a reusable workflow for server setup, emulator tests, and result reporting.

Changes: Mobile E2E workflow

Layer / File(s) Summary
Resolve platform and prepare build artifacts
.github/workflows/e2e-test-stack-mobile.yml
The workflow accepts either platform’s build-artifact link, validates the platform and build commit, and prepares the iOS app or Android APKs. Spec generation uses the resolved platform and device settings.
Prepare Android shard environment
.github/workflows/e2e-test-stack-mobile-android-shard.yml
The reusable workflow checks out the requested mobile commit, opens and provisions the assigned server, and prepares the Android SDK and emulator environment.
Run Android shard and publish results
.github/workflows/e2e-test-stack-mobile-android-shard.yml
The workflow runs the requested specs, collects triage evidence, retries result uploads, and reports upload or Detox failures.
Connect platform shards and workflow support
.github/workflows/e2e-test-stack-mobile.yml, .github/workflows/e2e-test-stack-mobile-ios-shard.yml, .github/workflows/e2e-test-stack-destroy.yml, .github/workflows/e2e-test-stack-run-services.yml, .github/workflows/e2e-test-stack-run.yml, e2e-test-stack/README.md
The workflow dispatches the matching platform shard and coordinates log collection, stack destruction, and platform-specific result reporting. Workflow filters, destroy-run validation, and workflow documentation are updated.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant MobileWorkflow as Mobile E2E workflow
  participant BuildArtifact as Build artifact
  participant AndroidShard as Android shard workflow
  participant ResultsService as Results service
  Operator->>MobileWorkflow: Supply build-artifact link
  MobileWorkflow->>BuildArtifact: Resolve platform and prepare Android APKs
  MobileWorkflow->>AndroidShard: Dispatch Android shard
  AndroidShard->>ResultsService: Upload shard results
  MobileWorkflow->>ResultsService: Collect platform-specific results
Loading

Possibly related PRs

Merge Risk: Minimal · up to 08c93

The change makes the manual mobile E2E workflow support iOS and Android artifacts, and keeps cleanup working for batches kept under the former workflow name. No merge-blocking risk was identified; Android runs remain to be exercised after merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the mobile E2E workflow now runs the Android Detox suite from a mobile build artifact, using the same workflow as iOS. The raw summary and objectives confirm the Andro…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the mobile E2E workflow now runs the Android Detox suite from a mobile build artifact, using the same workflow as iOS. The raw summary and objectives confirm the Android shard workflow, platform routing from the artifact link, and the cleanup changes. The title uses the conventional commit form and stays within a single sentence. It does not cover the destroy-workflow rename or the README update, which is acceptable for a title.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 44808f9a-1231-49af-86f7-7c020bccada5
Commits

Reviewing files that changed from the base of the PR and between 9ce9070 and 08c9381.

Files selected for processing: 1

  • .github/workflows/e2e-test-stack-destroy.yml

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Nitpick comments: 1

.github/workflows/e2e-test-stack-mobile-android-shard.yml: 1

325-325: Trivial · Performance & Scalability · Quick win

Do not cache SDK components supplied by the default runner.

The default ubuntu-24.04 image already supplies platform-tools and the API 35 platform. Copying them into this cache adds archive, restore and replacement work to every shard. Cache the components the image lacks instead. Keep conditional installation for custom runners or other API levels. (raw.githubusercontent.com)

Based on learnings, Ubuntu 24.04 runners already include SDK platforms and platform tools.

Source: Learnings

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 56d12aeb-8e3a-44ae-b9e2-bd16763bd509
Commits

Reviewing files that changed from the base of the PR and between 3941ad9 and 9ce9070.

Files selected for processing: 7

  • .github/workflows/e2e-test-stack-destroy.yml
  • .github/workflows/e2e-test-stack-mobile-android-shard.yml
  • .github/workflows/e2e-test-stack-mobile-ios-shard.yml
  • .github/workflows/e2e-test-stack-mobile.yml
  • .github/workflows/e2e-test-stack-run-services.yml
  • .github/workflows/e2e-test-stack-run.yml
  • e2e-test-stack/README.md

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

… workflow

A batch an e2e-test-stack-mobile-ios.yml run kept before the rename stays within its 4-hour TTL after this merges, and its run's path is still the old one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant