Skip to content

Commit c684b38

Browse files
authored
ci: improve setup -e2e-env for iOS (#197)
* feat: Enable Yarn global cache and add CocoaPods specs caching for faster E2E setup * ci: update CocoaPods caching and installation process for iOS E2E setup
1 parent 6038488 commit c684b38

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ runs:
230230
command: yarn install --immutable
231231
env:
232232
NODE_OPTIONS: --max-old-space-size=4096 # Increase memory limit for Node.js due to large dependencies
233+
YARN_ENABLE_GLOBAL_CACHE: 'true' # Enable Yarn's global cache for faster installs
233234

234235
- name: Install Foundry
235236
shell: bash
@@ -328,12 +329,26 @@ runs:
328329
run: sudo xcode-select -s "/Applications/Xcode_$XCODE_VERSION.app"
329330
shell: bash
330331

332+
- name: Restore CocoaPods specs cache
333+
if: ${{ inputs.platform == 'ios' }}
334+
id: cocoapods-specs-cache
335+
uses: actions/cache@v4
336+
with:
337+
path: ~/.cocoapods/repos
338+
key: ${{ runner.os }}-cocoapods-specs-${{ hashFiles('ios/Podfile.lock') }}
339+
restore-keys: |
340+
${{ runner.os }}-cocoapods-specs-
341+
continue-on-error: true # Don't fail if cache restoration has issues
342+
331343
# Install CocoaPods w/ cached bundler environment
332344
- name: Install CocoaPods via bundler
333345
if: ${{ inputs.platform == 'ios'}}
334-
run: bundle exec pod install --repo-update
335-
working-directory: ios
336-
shell: bash
346+
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 #v3.0.2
347+
with:
348+
timeout_minutes: 15
349+
max_attempts: 2
350+
retry_wait_seconds: 30
351+
command: cd ios && bundle exec pod install --repo-update
337352

338353
- name: Install applesimutils
339354
if: ${{ inputs.platform == 'ios' }}

0 commit comments

Comments
 (0)