diff --git a/.github/actions/composite/setupNode/action.yml b/.github/actions/composite/setupNode/action.yml index 643c707da230..4bc2b4787cfb 100644 --- a/.github/actions/composite/setupNode/action.yml +++ b/.github/actions/composite/setupNode/action.yml @@ -8,10 +8,38 @@ runs: with: node-version-file: '.nvmrc' cache: npm + cache-dependency-path: | + package-lock.json + desktop/package-lock.json - - name: Install node packages - uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350 + - id: cache-node-modules + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} + + - id: cache-desktop-node-modules + uses: actions/cache@v3 + with: + path: desktop/node_modules + key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json') }} + + - name: Install root project node packages + if: steps.cache-node-modules.outputs.cache-hit != 'true' + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + command: npm ci --ignore-scripts + + - name: Run patch-package + run: npx patch-package + shell: bash + + - name: Install node packages for desktop submodule + if: steps.cache-desktop-node-modules.outputs.cache-hit != 'true' + uses: nick-fields/retry@v2 with: timeout_minutes: 30 max_attempts: 3 - command: npm ci + command: cd desktop && npm ci diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index a5d203f86c47..bac7ab34920d 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -159,13 +159,12 @@ jobs: - uses: actions/cache@v3 id: cache-pods - if: github.run_attempt == '1' with: path: ios/Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - name: Install cocoapods - if: github.run_attempt != '1' || steps.cache-pods.outputs.cache-hit != 'true' + if: steps.cache-pods.outputs.cache-hit != 'true' uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350 with: timeout_minutes: 10 diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index e79b2d48cd8d..b75ee2a402e4 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -142,13 +142,12 @@ jobs: - uses: actions/cache@v3 id: cache-pods - if: github.run_attempt == '1' with: path: ios/Pods key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} - name: Install cocoapods - if: github.run_attempt != '1' || steps.cache-pods.outputs.cache-hit != 'true' + if: steps.cache-pods.outputs.cache-hit != 'true' uses: nick-invision/retry@0711ba3d7808574133d713a0d92d2941be03a350 with: timeout_minutes: 10