Skip to content

Commit c0d45f6

Browse files
test: installs foundry with yarn instead of global install
1 parent 9355fcc commit c0d45f6

5 files changed

Lines changed: 27 additions & 39 deletions

File tree

.github/actions/setup-e2e-env/action.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ inputs:
4141
description: JDK distribution to use (only for Android)
4242
required: false
4343
default: 'temurin'
44-
foundry-version:
45-
description: Foundry version to install
46-
required: false
47-
default: 'v0.3.0'
4844
android-avd-name:
4945
description: 'Name of AVD to create and boot (for Android)'
5046
required: false
@@ -231,22 +227,10 @@ runs:
231227

232228
- name: Install Foundry
233229
shell: bash
234-
env:
235-
FOUNDRY_VERSION: ${{ inputs.foundry-version }}
236230
run: |
237-
echo "Installing Foundry via foundryup..."
238-
239-
export FOUNDRY_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/.foundry"
240-
export FOUNDRY_BIN="$FOUNDRY_DIR/bin"
241-
242-
mkdir -p "$FOUNDRY_BIN"
243-
244-
curl -sL https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o "$FOUNDRY_BIN/foundryup"
245-
chmod +x "$FOUNDRY_BIN/foundryup"
246-
247-
echo "$FOUNDRY_BIN" >> "$GITHUB_PATH"
248-
249-
"$FOUNDRY_BIN/foundryup" -i "$FOUNDRY_VERSION"
231+
echo "Installing Foundry via yarn install:foundryup (matches local dev and tests/seeder)..."
232+
yarn install:foundryup
233+
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH"
250234
251235
## iOS Setup ##
252236

.github/workflows/build-android-e2e.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
- name: Checkout repo
4646
uses: actions/checkout@v4
4747

48+
- name: Restore .metamask folder (Foundry download cache for install:foundryup)
49+
uses: actions/cache@v4
50+
with:
51+
path: .metamask
52+
key: .metamask-${{ hashFiles('package.json', 'yarn.lock') }}
53+
4854
- name: Setup Android Build Environment
4955
timeout-minutes: 15
5056
uses: ./.github/actions/setup-e2e-env
@@ -55,16 +61,6 @@ jobs:
5561
android-api-level: 36
5662
target: ${{ inputs.keystore_target }} # qa for taget=main and flask for target=flask
5763

58-
- name: Restore .metamask folder
59-
id: restore-metamask
60-
uses: actions/cache@v4
61-
with:
62-
path: .metamask
63-
key: .metamask-${{ hashFiles('package.json', 'yarn.lock') }}
64-
65-
- name: Install Foundry if cache missed
66-
if: steps.restore-metamask.outputs.cache-hit != 'true'
67-
run: yarn install:foundryup
6864
- name: Setup project dependencies with retry
6965
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
7066
with:

.github/workflows/build-ios-e2e.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ jobs:
9696
ios/build
9797
key: ${{ runner.os }}-xcode-main-${{ env.XCODE_CACHE_VERSION }}-${{ hashFiles('ios/**/*.{h,m,mm,swift}', 'ios/**/Podfile.lock', 'yarn.lock') }}
9898

99+
- name: Restore .metamask folder (Foundry download cache for install:foundryup)
100+
uses: actions/cache@v4
101+
with:
102+
path: .metamask
103+
key: .metamask-${{ hashFiles('package.json', 'yarn.lock') }}
104+
99105
# Install Node.js, Xcode tools, and other iOS development dependencies
100106
- name: Installing iOS Environment Setup
101107
timeout-minutes: 15
@@ -122,16 +128,6 @@ jobs:
122128
- name: Clean iOS plist files
123129
run: find ios -name "*.plist" -exec xattr -c {} \;
124130

125-
- name: Restore .metamask folder
126-
id: restore-metamask
127-
uses: actions/cache@v4
128-
with:
129-
path: .metamask
130-
key: .metamask-${{ hashFiles('package.json', 'yarn.lock') }}
131-
132-
- name: Install Foundry if cache missed
133-
if: steps.restore-metamask.outputs.cache-hit != 'true'
134-
run: yarn install:foundryup
135131
# Run project setup with retry for better resilience
136132
- name: Setup project dependencies with retry
137133
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2

.github/workflows/run-e2e-workflow.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ jobs:
102102
- name: Checkout
103103
uses: actions/checkout@v4
104104

105+
- name: Restore .metamask folder
106+
uses: actions/cache@v4
107+
with:
108+
path: .metamask
109+
key: .metamask-${{ hashFiles('package.json', 'yarn.lock') }}
110+
105111
- name: Set up E2E environment
106112
timeout-minutes: 15
107113
uses: ./.github/actions/setup-e2e-env

.github/workflows/update-e2e-fixtures.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ jobs:
217217
with:
218218
ref: ${{ needs.prepare.outputs.BRANCH }}
219219

220+
- name: Restore .metamask folder (Foundry download cache for install:foundryup)
221+
uses: actions/cache@v4
222+
with:
223+
path: .metamask
224+
key: .metamask-${{ hashFiles('package.json', 'yarn.lock') }}
225+
220226
- name: Set up E2E environment
221227
timeout-minutes: 15
222228
uses: ./.github/actions/setup-e2e-env

0 commit comments

Comments
 (0)