diff --git a/.github/workflows/rn-build-android.yml b/.github/workflows/rn-build-android.yml index ed4d6345..6f28d4a7 100644 --- a/.github/workflows/rn-build-android.yml +++ b/.github/workflows/rn-build-android.yml @@ -39,6 +39,19 @@ jobs: with: distribution: zulu java-version: ${{ env.JAVA_VERSION }} + cache: gradle + cache-dependency-path: | + platforms/android/**/*.gradle* + platforms/android/**/gradle-wrapper.properties + platforms/android/gradle.properties + platforms/react-native/package.json + platforms/react-native/pnpm-lock.yaml + platforms/react-native/sample/package.json + platforms/react-native/sample/android/**/*.gradle* + platforms/react-native/sample/android/**/gradle-wrapper.properties + platforms/react-native/sample/android/gradle.properties + platforms/react-native/modules/@shopify/checkout-kit-react-native/android/**/*.gradle* + platforms/react-native/modules/@shopify/checkout-kit-react-native/android/gradle.properties - name: Build Android sample timeout-minutes: 20 diff --git a/.github/workflows/rn-build-ios.yml b/.github/workflows/rn-build-ios.yml index 6c25232f..0f73be01 100644 --- a/.github/workflows/rn-build-ios.yml +++ b/.github/workflows/rn-build-ios.yml @@ -55,6 +55,12 @@ jobs: bundler-cache: true working-directory: platforms/react-native/sample + - name: Cache cocoapods + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: platforms/react-native/sample/ios/Pods + key: ${{ runner.os }}-cocoapods-${{ hashFiles('platforms/react-native/sample/ios/Podfile.lock', 'platforms/react-native/sample/Gemfile.lock', 'platforms/react-native/sample/Gemfile', 'platforms/react-native/package.json', 'platforms/react-native/sample/package.json', 'platforms/react-native/modules/@shopify/checkout-kit-react-native/package.json', 'platforms/react-native/pnpm-lock.yaml') }} + - name: Install cocoapods working-directory: platforms/react-native/sample run: | diff --git a/.github/workflows/rn-check-packed-files.yml b/.github/workflows/rn-check-packed-files.yml index 9a27aba0..65fac36e 100644 --- a/.github/workflows/rn-check-packed-files.yml +++ b/.github/workflows/rn-check-packed-files.yml @@ -34,14 +34,6 @@ jobs: package-json-file: platforms/react-native/package.json working-directory: platforms/react-native - - name: Cache turbo build setup - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - with: - path: platforms/react-native/.turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - - name: Build module and compare snapshot run: | pnpm module clean diff --git a/.github/workflows/rn-lint.yml b/.github/workflows/rn-lint.yml index dfe9bd08..3f278839 100644 --- a/.github/workflows/rn-lint.yml +++ b/.github/workflows/rn-lint.yml @@ -41,14 +41,6 @@ jobs: package-json-file: platforms/react-native/package.json working-directory: platforms/react-native - - name: Cache turbo build setup - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - with: - path: platforms/react-native/.turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - - name: Build module run: pnpm module build diff --git a/.github/workflows/rn-test-android.yml b/.github/workflows/rn-test-android.yml index 367da40d..6f026b35 100644 --- a/.github/workflows/rn-test-android.yml +++ b/.github/workflows/rn-test-android.yml @@ -39,14 +39,19 @@ jobs: with: distribution: zulu java-version: ${{ env.JAVA_VERSION }} - - - name: Cache turbo build setup - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - with: - path: platforms/react-native/.turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- + cache: gradle + cache-dependency-path: | + platforms/android/**/*.gradle* + platforms/android/**/gradle-wrapper.properties + platforms/android/gradle.properties + platforms/react-native/package.json + platforms/react-native/pnpm-lock.yaml + platforms/react-native/sample/package.json + platforms/react-native/sample/android/**/*.gradle* + platforms/react-native/sample/android/**/gradle-wrapper.properties + platforms/react-native/sample/android/gradle.properties + platforms/react-native/modules/@shopify/checkout-kit-react-native/android/**/*.gradle* + platforms/react-native/modules/@shopify/checkout-kit-react-native/android/gradle.properties - name: Run Android tests timeout-minutes: 20 diff --git a/.github/workflows/rn-test-ios.yml b/.github/workflows/rn-test-ios.yml index f270f095..abc2113a 100644 --- a/.github/workflows/rn-test-ios.yml +++ b/.github/workflows/rn-test-ios.yml @@ -48,14 +48,6 @@ jobs: package-json-file: platforms/react-native/package.json working-directory: platforms/react-native - - name: Cache turbo build setup - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - with: - path: platforms/react-native/.turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - - name: Setup Ruby uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # v1.307.0 with: