From dc2d35224c009e40cfa97de6cfa884aeacc8a701 Mon Sep 17 00:00:00 2001 From: Kieran Osgood Date: Wed, 12 Aug 2026 17:57:23 +0100 Subject: [PATCH] Make the CocoaPods spec repo refresh opt-in on CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of the macOS CI speed-up. Tracked on shop/issues-checkout-kit#1204, under shop/issues-checkout-kit#1202. ## Problem Both React Native iOS jobs passed `--repo-update` **and** `--deployment` to `pod install`. Deployment mode forbids any lockfile change, so the spec repo refresh cannot alter the resolved pods. It is time spent on a result that is discarded by definition. `e2e/bitrise.yml:170` already omits it. ## Change - `platforms/react-native/sample/scripts/test_ios:29` gates the flag behind a new `POD_REPO_UPDATE` variable. - `.github/workflows/rn-build-ios.yml` drops `--repo-update` and keeps `--deployment`. ## Baseline to beat | Step | n | median | p90 | | --- | --- | --- | --- | | `React Native / Build iOS Sample` → `Install cocoapods` | 11 | 28s | 1m04s | This is the smallest win in the plan. It is included because it is nearly free. ## 🔴 Only half of this is measurable `React Native / Run iOS Tests` has no separate `Install cocoapods` step — `test_ios` runs `pod install` inside the test step. The refresh it drops is real but is not separately timed on GitHub Actions, so only the Build iOS Sample side produces a number. ## Verification - `shadowenv exec -- ./scripts/test_ruby` — green. ## Open question for the author `platforms/react-native/scripts/pod_install:17` still hardcodes `--repo-update`. It is deliberately untouched: it is reachable only through `dev rn pod-install`, and `CLAUDE.md` directs people to that command precisely when they need to regenerate a lockfile, which is when a refresh is the correct behaviour. --- .github/workflows/rn-build-ios.yml | 2 +- platforms/react-native/sample/scripts/test_ios | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rn-build-ios.yml b/.github/workflows/rn-build-ios.yml index 18635f16c..a6962bfcb 100644 --- a/.github/workflows/rn-build-ios.yml +++ b/.github/workflows/rn-build-ios.yml @@ -64,7 +64,7 @@ jobs: set -euo pipefail bundle install cd ios - bundle exec pod install --deployment --repo-update + bundle exec pod install --deployment - name: Build module run: pnpm module build diff --git a/platforms/react-native/sample/scripts/test_ios b/platforms/react-native/sample/scripts/test_ios index 89b8340cc..f5bbb3906 100755 --- a/platforms/react-native/sample/scripts/test_ios +++ b/platforms/react-native/sample/scripts/test_ios @@ -26,7 +26,7 @@ cd "$TEST_APP_DIR" if [ "${USE_LOCAL_SDK:-0}" = "1" ]; then bundle exec pod update ShopifyCheckoutKit ShopifyCheckoutKit/AcceleratedCheckouts --repo-update else - pod_install_args="--repo-update" + pod_install_args="${POD_REPO_UPDATE:+--repo-update}" if [ "$CI" = "true" ]; then pod_install_args="$pod_install_args --deployment" fi