Skip to content

Commit c8a2afb

Browse files
abueideclaude
andauthored
perf(ci): optimize React Native E2E by caching node_modules and removing --repo-update (#56)
The CocoaPods --repo-update flag re-downloads the entire spec repo on every run (~3-8 min). The workflow already caches ~/.cocoapods/repos, so the flag is unnecessary. Also adds node_modules caching to avoid redundant npm installs. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3e67c74 commit c8a2afb

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/e2e-react-native.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
cache: 'npm'
3636
cache-dependency-path: examples/react-native/package-lock.json
3737

38+
- name: Cache node_modules
39+
uses: actions/cache@v5
40+
with:
41+
path: examples/react-native/node_modules
42+
key: ${{ runner.os }}-node-modules-${{ hashFiles('examples/react-native/package-lock.json') }}
43+
restore-keys: |
44+
${{ runner.os }}-node-modules-
45+
3846
- name: Enable KVM (Android only)
3947
if: matrix.platform == 'android'
4048
run: |

examples/react-native/tests/test-suite-all-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ processes:
128128
129129
cd ios
130130
echo "Installing CocoaPods dependencies..."
131-
pod install --repo-update
131+
pod install
132132
echo 'Pod install complete'
133133
134134
echo "pass" > "$_step_dir/$_step.status"

examples/react-native/tests/test-suite-ios-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ processes:
8080
8181
cd ios
8282
echo "Installing CocoaPods dependencies..."
83-
pod install --repo-update
83+
pod install
8484
echo 'Pod install complete'
8585
8686
echo "pass" > "$_step_dir/$_step.status"

0 commit comments

Comments
 (0)