Skip to content

ci: improve E2E merge gate, add yarn cache, rename flakiness label#29553

Merged
jvbriones merged 8 commits into
mainfrom
test-e2e-readiness-label-1
Apr 30, 2026
Merged

ci: improve E2E merge gate, add yarn cache, rename flakiness label#29553
jvbriones merged 8 commits into
mainfrom
test-e2e-readiness-label-1

Conversation

@jvbriones

@jvbriones jvbriones commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

Three independent improvements to the CI pipeline:

  • E2E merge gate fix: Gate now checks build jobs too (build-android-apks, build-ios-apps). Previously a failed build caused smoke tests to skip, which the gate treated as passing. This will avoid PRs getting merged with broken builds like: https://github.com/MetaMask/metamask-mobile/actions/runs/25074016847
  • Yarn cache: Added node_modules + .yarn/install-state.gz caching to component-view-tests, merge-unit-and-component-view-tests, and setup-e2e-env. Saves ~2–4 min on cache hits.
  • Label rename: skip-e2e-quality-gate → skip-e2e-flakiness-detection. Post-merge: rename the label manually in GitHub repo settings.
  • Time-gated auto-labeling: The pr-not-ready-for-e2e label is now only auto-applied to new PRs opened between 13:00–17:00 UTC (15:00–19:00 CEST / 9:00–13:00 EDT), targeting the Europe–US East Coast overlap window.

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Note

Medium Risk
Modifies CI workflow gating and label-driven behavior that can block or permit merges, so misconfiguration could affect release throughput. Changes are scoped to GitHub Actions/scripts and caching, with no app runtime impact.

Overview
CI merge gating is tightened for E2E by treating failures/cancellations in build-android-apks and build-ios-apps as merge-blocking (previously a failed build could cause smoke tests to skip and still pass the gate), while still allowing intentional skipped outcomes when E2E is not expected to run.

Dependency caching is expanded by caching node_modules plus .yarn/install-state.gz in the shared setup-e2e-env action and in ci.yml jobs that run component-view tests and coverage merge, skipping yarn install on cache hits.

Labeling/controls are updated: skip-e2e-quality-gate is renamed to skip-e2e-flakiness-detection across scripts, rerun triggers, and docs; auto-label-not-ready-for-e2e is time-gated (13:00–17:00 UTC) before applying pr-not-ready-for-e2e; and documentation/ownership is updated (adds QA ownership for E2E_DECISION_TREE.md and clarifies skip-e2e as an exceptional “skip builds + all E2E” escape hatch).

Reviewed by Cursor Bugbot for commit ede188d. Bugbot is set up for automated code reviews on this repo. Configure here.

@jvbriones jvbriones requested a review from a team as a code owner April 30, 2026 10:33
@metamaskbotv2 metamaskbotv2 Bot added the team-qa QA team label Apr 30, 2026
@github-actions

Copy link
Copy Markdown
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.

@jvbriones jvbriones added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed skip-e2e skip E2E test jobs and removed no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Apr 30, 2026
@jvbriones jvbriones added pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. and removed skip-e2e skip E2E test jobs labels Apr 30, 2026
@github-actions github-actions Bot added size-S and removed size-XS labels Apr 30, 2026
@jvbriones jvbriones added skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run and removed pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. labels Apr 30, 2026
@jvbriones jvbriones requested a review from a team as a code owner April 30, 2026 14:34
@jvbriones jvbriones changed the title ci: rename e2e quality gate PR label ci: improve E2E merge gate, add yarn cache, rename flakiness label Apr 30, 2026
@jvbriones jvbriones removed the skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run label Apr 30, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 85a1ea8. Configure here.

Comment thread .github/workflows/rerun-ci-on-skipped-e2e-labels.yml Outdated
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 8 changed files are CI infrastructure, documentation, and configuration files with no application code changes:

  1. .github/actions/setup-e2e-env/action.yml: Adds .yarn/install-state.gz to the yarn cache path — a CI cache optimization that doesn't affect app behavior or test logic.

  2. .github/workflows/ci.yml: Two improvements — (a) adds node_modules cache restoration to speed up CI jobs, and (b) expands the all-jobs-pass gate to also check build-android-apks and build-ios-apps results. These are CI pipeline reliability improvements, not app changes.

  3. .github/workflows/auto-label-not-ready-for-e2e.yml: Adds a time-window check (13:00–17:00 UTC) for auto-applying the pr-not-ready-for-e2e label. Pure workflow logic change.

  4. .github/workflows/rerun-ci-on-skipped-e2e-labels.yml: Renames label skip-e2e-quality-gateskip-e2e-flakiness-detection and adds error handling for the rerun command.

  5. .github/scripts/e2e-split-tags-shards.mjs: Updates the label name check to match the renamed label — consistent with the workflow change.

  6. .github/guidelines/E2E_DECISION_TREE.md and .github/guidelines/LABELING_GUIDELINES.md: Documentation updates reflecting the label rename and new guidance.

  7. .github/CODEOWNERS: Adds E2E_DECISION_TREE.md to QA team ownership.

None of these changes touch application source code, E2E test files, test page objects, fixtures, or any component that would require Detox E2E validation. The CI workflow changes are validated by GitHub Actions itself when the workflows run, not by Detox tests. No performance-sensitive code is modified either.

Performance Test Selection:
No application code, UI components, state management, or performance-sensitive paths were modified. All changes are CI infrastructure, workflow configuration, documentation, and label renaming. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@jvbriones jvbriones enabled auto-merge April 30, 2026 16:06
@jvbriones jvbriones added this pull request to the merge queue Apr 30, 2026
Merged via the queue into main with commit 84250b3 Apr 30, 2026
61 checks passed
@jvbriones jvbriones deleted the test-e2e-readiness-label-1 branch April 30, 2026 19:37
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants