Skip to content

Commit f82a4ff

Browse files
authored
chore(šŸ™): lock eas-cli and playwright via yarn.lock, remove deprecated expo-cli (#3796)
* Pin CI dependencies: lock eas-cli and playwright via yarn.lock, remove deprecated expo-cli - Remove 'npm install -g expo-cli eas-cli' from all three jobs (test-skia-ios, test-skia-android, test-skia-web). expo-cli is deprecated upstream and the workflow already uses the local expo package via 'npx expo'. eas-cli is added as a devDependency instead. - Remove 'npm install -g playwright' from test-skia-web. playwright is added as a devDependency and invoked via 'yarn playwright'. - Replace all 'npx playwright' calls with 'yarn playwright'. - Add eas-cli@18.4.0 and playwright@1.59.0 as devDependencies so their full transitive dependency trees are locked by yarn.lock. npm install -g resolves the full transitive dependency tree from the npm registry at install time with no lockfile. eas-cli pulls ~394 transitive deps; expo-cli pulls ~986 (and is deprecated). npx is equally dangerous as it does the same resolution at runtime. Adding these tools as devDependencies locks the entire tree via yarn.lock. * Add yarn install step before playwright commands in test-skia-web The workflow checks out the repo but never ran yarn install, so node_modules didn't exist. yarn playwright requires node_modules to resolve the playwright binary from the lockfile. * Replace all npx expo calls with yarn expo npx has the same fetch-from-registry-without-lockfile risk as npm install -g. The test apps are created with yarn create expo-app, so expo is a local dependency and yarn expo works directly.
1 parent b56436d commit f82a4ff

3 files changed

Lines changed: 1797 additions & 141 deletions

File tree

ā€Ž.github/workflows/test-skia-package.ymlā€Ž

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ jobs:
5858
corepack enable
5959
yarn --version
6060
61-
- name: Install Expo CLI
62-
run: |
63-
npm install -g expo-cli eas-cli
64-
expo --version
65-
6661
- name: List available simulators
6762
run: xcrun simctl list devices
6863

@@ -126,19 +121,19 @@ jobs:
126121
working-directory: /Users/runner/skia-test-app/my-app
127122
run: |
128123
echo "Installing TypeScript dependencies..."
129-
npx expo install typescript @types/react
124+
yarn expo install typescript @types/react
130125
131126
- name: Install Expo Dev Client
132127
working-directory: /Users/runner/skia-test-app/my-app
133128
run: |
134129
echo "Installing expo-dev-client..."
135-
npx expo install expo-dev-client
130+
yarn expo install expo-dev-client
136131
137132
- name: Prebuild native directories
138133
working-directory: /Users/runner/skia-test-app/my-app
139134
run: |
140135
echo "Generating native iOS directory..."
141-
npx expo prebuild --platform ios
136+
yarn expo prebuild --platform ios
142137
143138
- name: Install iOS dependencies
144139
working-directory: /Users/runner/skia-test-app/my-app
@@ -151,14 +146,14 @@ jobs:
151146
working-directory: /Users/runner/skia-test-app/my-app
152147
run: |
153148
echo "Starting Metro bundler in background..."
154-
npx expo start --dev-client &
149+
yarn expo start --dev-client &
155150
sleep 10
156151
157152
- name: Build and run iOS app
158153
working-directory: /Users/runner/skia-test-app/my-app
159154
run: |
160155
echo "Building and running iOS app on simulator: ${{ inputs.simulator_device }}..."
161-
npx expo run:ios --device "${{ inputs.simulator_device }}"
156+
yarn expo run:ios --device "${{ inputs.simulator_device }}"
162157
163158
- name: Wait for app to launch
164159
run: |
@@ -215,11 +210,6 @@ jobs:
215210
corepack enable
216211
yarn --version
217212
218-
- name: Install Expo CLI
219-
run: |
220-
npm install -g expo-cli eas-cli
221-
expo --version
222-
223213
- name: Setup Java
224214
uses: actions/setup-java@v5
225215
with:
@@ -294,19 +284,19 @@ jobs:
294284
working-directory: /Users/runner/skia-test-app/my-app
295285
run: |
296286
echo "Installing TypeScript dependencies..."
297-
npx expo install typescript @types/react
287+
yarn expo install typescript @types/react
298288
299289
- name: Install Expo Dev Client
300290
working-directory: /Users/runner/skia-test-app/my-app
301291
run: |
302292
echo "Installing expo-dev-client..."
303-
npx expo install expo-dev-client
293+
yarn expo install expo-dev-client
304294
305295
- name: Prebuild native directories
306296
working-directory: /Users/runner/skia-test-app/my-app
307297
run: |
308298
echo "Generating native Android directory..."
309-
npx expo prebuild --platform android
299+
yarn expo prebuild --platform android
310300
311301
- name: Start Android emulator
312302
run: |
@@ -325,14 +315,14 @@ jobs:
325315
working-directory: /Users/runner/skia-test-app/my-app
326316
run: |
327317
echo "Starting Metro bundler in background..."
328-
npx expo start --dev-client &
318+
yarn expo start --dev-client &
329319
sleep 10
330320
331321
- name: Build and run Android app
332322
working-directory: /Users/runner/skia-test-app/my-app
333323
run: |
334324
echo "Building and running Android app on emulator..."
335-
npx expo run:android
325+
yarn expo run:android
336326
337327
- name: Wait for app to launch
338328
run: |
@@ -384,11 +374,6 @@ jobs:
384374
corepack enable
385375
yarn --version
386376
387-
- name: Install Expo CLI
388-
run: |
389-
npm install -g expo-cli eas-cli
390-
expo --version
391-
392377
- name: Create test directory
393378
run: |
394379
mkdir -p /Users/runner/skia-test-app
@@ -449,20 +434,22 @@ jobs:
449434
working-directory: /Users/runner/skia-test-app/my-app
450435
run: |
451436
echo "Installing TypeScript dependencies..."
452-
npx expo install typescript @types/react
437+
yarn expo install typescript @types/react
438+
439+
- name: Install repo dependencies for Playwright
440+
run: yarn install --immutable
453441

454442
- name: Install Playwright dependencies
455443
run: |
456444
echo "Installing Playwright..."
457-
npm install -g playwright
458-
npx playwright install chromium
459-
npx playwright install-deps chromium
445+
yarn playwright install chromium
446+
yarn playwright install-deps chromium
460447
461448
- name: Start web server
462449
working-directory: /Users/runner/skia-test-app/my-app
463450
run: |
464451
echo "Starting web server in background..."
465-
npx expo start --web &
452+
yarn expo start --web &
466453
sleep 30
467454
468455
- name: Wait for web app to be ready
@@ -476,7 +463,7 @@ jobs:
476463
if: always()
477464
run: |
478465
echo "Taking screenshot of web app..."
479-
npx playwright screenshot http://localhost:8081 /Users/runner/skia-test-screenshot-web.png || echo "Failed to capture screenshot"
466+
yarn playwright screenshot http://localhost:8081 /Users/runner/skia-test-screenshot-web.png || echo "Failed to capture screenshot"
480467
481468
- name: Upload screenshot
482469
if: always()

ā€Žpackage.jsonā€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"@webgpu/types": "^0.1.69"
3636
},
3737
"devDependencies": {
38+
"eas-cli": "18.4.0",
39+
"playwright": "1.59.0",
3840
"react-native-test-app": "^4.2.0",
3941
"turbo": "^2.1.1"
4042
}

0 commit comments

Comments
Ā (0)