Skip to content

test: installs foundry with yarn instead of global install#29191

Merged
christopherferreira9 merged 1 commit into
mainfrom
cferreira/align-foundry-ci-local
Apr 23, 2026
Merged

test: installs foundry with yarn instead of global install#29191
christopherferreira9 merged 1 commit into
mainfrom
cferreira/align-foundry-ci-local

Conversation

@christopherferreira9

@christopherferreira9 christopherferreira9 commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Description

E2E setup was installing Anvil with the upstream foundryup script into the user’s Foundry directory and prepending that to PATH, while the repo pins Anvil through package.json and tests/seeder/anvil-manager.ts resolves node_modules/.bin/anvil when that file exists. In CI, the global install often “won” when the project-local binary was missing, so the chain did not always match local dev or the seeder’s resolved binary.

  • ./.github/actions/setup-e2e-env: Replace the global Foundry/curl foundryup step with yarn install:foundryup so the version and checksums come from the same package.json foundryup config as the rest of the project. Remove the foundry-version input; bump the toolchain by editing that config, not a workflow input. After install, add $GITHUB_WORKSPACE/node_modules/.bin to GITHUB_PATH so bare anvil on the runner matches the project binary.
  • build-android-e2e / build-ios-e2e: Restore the .metamask cache before the composite E2E setup action (so mm-foundryup can reuse download cache when available) and remove the redundant “Install Foundry if cache missed” step now covered by the action.
  • run-e2e-workflow / update-e2e-fixtures: Restore .metamask before setup-e2e-env for the same cache behavior. No foundry-version was passed in callers; no consumer updates are required for removed inputs.

Changelog

CHANGELOG entry:

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1118

Manual testing steps

N/A

Screenshots/Recordings

N/A

Before

N/A

After

N/A

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
Moderate risk because it changes CI/E2E environment provisioning and PATH/caching behavior, which can break E2E runs if the Yarn-based Foundry install or cache assumptions are incorrect.

Overview
E2E CI now installs Foundry via yarn install:foundryup inside the setup-e2e-env composite action (and adds node_modules/.bin to GITHUB_PATH), replacing the previous curl-based foundryup global install and removing the foundry-version action input.

The Android/iOS build, E2E run, and fixture-update workflows restore the .metamask cache before calling setup-e2e-env, and drop the extra “install Foundry if cache missed” steps since installation is handled centrally by the action.

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

@christopherferreira9 christopherferreira9 requested a review from a team as a code owner April 22, 2026 15:29
@christopherferreira9 christopherferreira9 added team-qa QA team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Apr 22, 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.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
All 5 changed files are CI/workflow infrastructure files with no app code changes. The changes are:

  1. setup-e2e-env/action.yml: Refactored Foundry installation to use yarn install:foundryup (already used in ci.yml, performance-test-runner.yml, setup-node-modules.yml) instead of a custom curl-based script. Removed the foundry-version input. Adds node_modules/.bin to PATH.

  2. build-android-e2e.yml & build-ios-e2e.yml: Moved .metamask folder cache restore step to BEFORE setup-e2e-env runs (instead of after), so cached Foundry binaries are available during setup. Removed the now-redundant separate "Install Foundry if cache missed" step.

  3. run-e2e-workflow.yml & update-e2e-fixtures.yml: Added .metamask folder cache restore before E2E environment setup for the same reason.

These are CI pipeline consistency and reliability improvements. The yarn install:foundryup approach is already proven in other workflows. No application code is modified.

Running a small representative set of tests (SmokeConfirmations + SmokeAccounts) validates that the E2E pipeline infrastructure (build + run) works correctly end-to-end after the Foundry installation refactoring and cache ordering changes. These two tags cover both iOS and Android builds and exercise core test infrastructure including fixture servers that depend on Foundry.

Performance Test Selection:
No app code changes were made. All changes are CI/workflow infrastructure improvements (Foundry installation refactoring and cache ordering). Performance tests measure app responsiveness and are not relevant to CI pipeline changes.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

AI PR Analysis

Merge safe: true | 🟢 Risk: low

Merge decision: These changes are confined to E2E testing workflows and the supporting action, with no modifications to production code or main CI/CD pipelines. The updates simplify Foundry installation and caching, reducing potential for errors without altering existing functionality.

  • Changes to E2E setup workflows could potentially slow or fail E2E CI runs if caching or yarn install fails, but this does not impact production builds or deploys.
  • No existing production behavior is modified; purely additive optimizations to test infra.
  • No consumers of production modules affected.

View run

@github-actions github-actions Bot added the risk:low AI analysis: low risk label Apr 22, 2026
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
12 value mismatches detected (expected — fixture represents an existing user).
View details

@christopherferreira9 christopherferreira9 added this pull request to the merge queue Apr 23, 2026
Merged via the queue into main with commit 34a82a1 Apr 23, 2026
164 of 168 checks passed
@christopherferreira9 christopherferreira9 deleted the cferreira/align-foundry-ci-local branch April 23, 2026 18:08
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.75.0 Issue or pull request that will be included in release 7.75.0 label Apr 23, 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.75.0 Issue or pull request that will be included in release 7.75.0 risk:low AI analysis: low risk size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants