Skip to content

Commit

Permalink
test: rn detox cache ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwin Kumar committed Feb 24, 2025
1 parent f882061 commit 77ac11e
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions .github/workflows/callable-e2e-test-detox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,48 @@ jobs:
run: |
echo "YARN_LOCK_PATH=${{ inputs.working_directory }}/yarn.lock"
echo "YARN_LOCK_PATH=${{ inputs.working_directory }}/yarn.lock" >> $GITHUB_OUTPUT
echo "YARN_LOCK_HASH=$(sha256sum '${{ inputs.working_directory }}/yarn.lock' | awk '{print $1}')" >> $GITHUB_OUTPUT
echo "POD_LOCK_PATH=${{ inputs.working_directory }}/ios/Podfile.lock" >> $GITHUB_OUTPUT
echo "DETOX_BUILD_PATH=${{ inputs.working_directory }}/ios/build" >> $GITHUB_OUTPUT
- name: test cache
run: echo "${{ steps.cache_paths.outputs.YARN_LOCK_PATH }}"
run: |
echo "yarn lock path: ${{ steps.cache_paths.outputs.YARN_LOCK_PATH }}"
echo "pods lock path: ${{ steps.cache_paths.outputs.POD_LOCK_PATH }}"
echo "yarn lock hash: ${{ steps.cache_paths.outputs.YARN_LOCK_HASH }}"
- name: Cache node_modules
id: modules-cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ inputs.working_directory }}/node_modules
key: |
${{ inputs.test_name }}-detox-modules-${{ hashFiles(steps.cache_paths.outputs.YARN_LOCK_PATH) }}
restore-keys: |
${{ inputs.test_name }}-detox-modules-
# - name: Cache node_modules
# id: modules-cache
# uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
# with:
# path: ${{ inputs.working_directory }}/node_modules
# key: |
# ${{ inputs.test_name }}-detox-modules-${{ hashFiles(steps.cache_paths.outputs.YARN_LOCK_PATH) }}
# restore-keys: |
# ${{ inputs.test_name }}-detox-modules-
- name: Yarn Install
if: steps.modules-cache.outputs.cache-hit != 'true'
# if: steps.modules-cache.outputs.cache-hit != 'true'
working-directory: ${{ inputs.working_directory }}
run: |
rm -rf yarn.lock
echo "Current NPM registry: " $(yarn config get registry)
$GITHUB_WORKSPACE/amplify-js/scripts/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3
shell: bash

# # - name: Cache Pods
# # id: pods-cache
# # uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
# # with:
# # path: ${{ inputs.working_directory }}/ios/Pods
# # key: ${{ inputs.test_name }}-pods-${{ hashFiles(steps.cache_paths.outputs.POD_LOCK_PATH) }}
# # restore-keys: |
# # ${{ inputs.test_name }}-pods-
# - name: Install CocoaPods
# # if: steps.pods-cache.outputs.cache-hit != 'true'
# run: |
# cd ios && pod install
# working-directory: ${{ inputs.working_directory }}
# shell: bash
- name: Cache Pods
id: pods-cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ inputs.working_directory }}/ios/Pods
key: ${{ inputs.test_name }}-pods-${{ hashFiles(steps.cache_paths.outputs.POD_LOCK_PATH) }}
restore-keys: |
${{ inputs.test_name }}-pods-
- name: Install CocoaPods
if: steps.pods-cache.outputs.cache-hit != 'true'
run: |
cd ios && pod install
working-directory: ${{ inputs.working_directory }}
shell: bash

# - name: Start Metro Packager (background)
# run: |
Expand Down

0 comments on commit 77ac11e

Please sign in to comment.