mattermost-mobile-upstream/.github/workflows
Claude 9e5a5565e0
fix(e2e): stop a shard retry from discarding a good report, and keep failure artifacts
The Android jump from 3 failures (7f75e5c) to 23 (6a269a9) is not a product
regression. 6a269a9 changes three lines of app code — an awaited
updateLocalCustomStatus in the account row — and 22 of the 27 failures in that
run's merged report are "[launchAndVerify] Neither server.screen nor
channel_list.screen appeared within 90s", i.e. the app never launched at all.

Shard 13 of run 32184155037 is the whole story. Its job log:

    Test Suites: 1 failed, 6 passed, 7 total
    Tests:       2 failed, 20 passed, 22 total
    ==> Attempt 1 failed with exit 1
    ==> Cleaning up before retry
    ...
    Test Suites: 7 failed, 7 total
    Tests:       22 failed, 22 total
    ==> Attempt 2 failed with exit 1

Attempt 1 was a normal run with the two known custom-status flakes. Because jest
exits 1 on any test failure, the retry wrapper treated that as an infra failure,
wiped detox/artifacts, killed the emulator and re-ran all seven specs. Every
launch on the re-booted emulator then failed inside Espresso with "Waited for the
root of the view hierarchy to have window focus and not request layout for 10
seconds ... has-window-focus=false", so the shard's final report — the only one
that survives — read 22 failed. That single retry is 20 of the 23 failures.

Changes:

* e2e-android-template.yml: retry only when the attempt produced no usable
  verdict. A report covering every assigned spec with at least one passing test
  means the emulator worked and the failures are test failures, so it is kept.
  A missing report (killed by the 60m timeout, bootstrap failure) or a report
  with nothing passing still retries.

* create_android_emulator.sh: keep the display awake and unlocked
  (svc power stayon, screen_off_timeout, KEYCODE_WAKEUP, dismiss-keyguard,
  CLOSE_SYSTEM_DIALOGS), force-stop Chrome after priming its command-line file
  instead of relying on one BACK that lands on its splash, and gate the run on
  the emulator actually having a focused window.

* setup.ts: recover the device between launch attempts rather than only
  relaunching the app, and log mCurrentFocus/mFocusedApp so a repeat is
  diagnosable from the job log.

* save_report.js: stop deleting the whole {platform}-results-* folders before the
  S3 upload. That removed every device.log and testFnFailure.png Detox wrote, so
  the S3 report only ever carried the HTML summary — path_builder.js names each
  folder after the Jest fullName so TSIO can link screenshots, but the files never
  arrived. Only the parts already merged into the top-level report (per-shard
  jest-stare, junit XML, jest-results.json) are dropped now. Video is off and
  screenshots are failure-only, so the upload stays small.

* Maestro MM-T5611: the flow failed on "Assertion is false: id: tab_bar.home.tab
  is visible". bookmark-browser-opened.png shows Safari in the foreground on
  mattermost.com with the back-to-app pill present, so the hand-off worked; the
  `when: notVisible` guard after the breadcrumb tap sampled the hierarchy while
  iOS was still resuming the suspended app, dropped into the cold-restart
  recovery, and that sub-flow's 30s wait for the tab bar expired. Give the resume
  its own optional wait before the guard, and let a cold start have 60s.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-19 01:56:02 +00:00
..
build-android-beta.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-android-release.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-ios-beta.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-ios-release.yml Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
build-pr.yml test(detox): re-submit RF→Detox migration without unintended UI changes (#9847) 2026-06-19 22:44:02 +05:30
ci.yml ci(e2e): per-job TSIO report groups, commit statuses, and webhook sidecar (#9969) 2026-07-29 13:45:06 +05:30
cmt-provisioner.yml feat(e2e): Integrate TSIO reporting (#9925) 2026-07-23 06:43:28 +00:00
codeql-analysis.yml Bump the github-actions-updates group across 5 directories with 6 updates (#8613) 2025-02-19 14:28:06 +02:00
compatibility-matrix-testing.yml chore(e2e): Cache app builds. Skip E2E on docs only PR. (#9930) 2026-08-04 19:13:39 +05:30
docs-impact-review.yml Update docs impact review workflow to Claude Sonnet 4.6 (#9840) 2026-06-16 10:38:51 +00:00
e2e-android-template.yml fix(e2e): stop a shard retry from discarding a good report, and keep failure artifacts 2026-08-19 01:56:02 +00:00
e2e-detox-pr.yml fix(ci): avoid Bundler deployment mode for Fastlane gem cache (#10037) 2026-08-12 02:03:07 +05:30
e2e-detox.yml chore(e2e): Cache app builds. Skip E2E on docs only PR. (#9930) 2026-08-04 19:13:39 +05:30
e2e-ios-template.yml ci(e2e): raise Detox shard count from 20 to 22 2026-08-17 11:45:38 +05:30
e2e-label-manager.yml chore(e2e): Cache app builds. Skip E2E on docs only PR. (#9930) 2026-08-04 19:13:39 +05:30
e2e-maestro-pr.yml ci(e2e): make E2E/Override waive checks instead of cancelling runs (#9975) 2026-07-31 14:22:19 +02:00
e2e-maestro-template.yml ci(e2e): stop installing ffmpeg/scrot, and bound the apt step 2026-08-18 07:19:28 +05:30
github-release.yml Bump Snyk CLI version in release workflow (#9838) 2026-06-17 10:34:23 +01:00
pr-test-analysis-override.yml feat(workflow): pr test analysis (#9690) 2026-04-17 09:13:08 +08:00
pr-test-analysis.yml feat(workflow): pr test analysis (#9690) 2026-04-17 09:13:08 +08:00
validate-intune-clean.yml feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00