Skip to content

Commit dd02449

Browse files
Add node modules to sentry step
1 parent ca29842 commit dd02449

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/web.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,51 @@ jobs:
650650
with:
651651
node-version: ${{ env.NODE_VERSION }}
652652

653+
- name: Create concatenated patch file
654+
id: patch-file
655+
run: |
656+
ls -d -- packages/*/patches/*.patch 2>/dev/null | xargs cat > combined-patch-file.txt || touch combined-patch-file.txt
657+
echo "patch_checksum=$(sha256sum combined-patch-file.txt | cut -d' ' -f1)" >> $GITHUB_OUTPUT
658+
659+
- name: Cache node modules
660+
id: cache-node-modules
661+
uses: actions/cache@v4
662+
with:
663+
path: |
664+
node_modules
665+
packages/web/node_modules
666+
packages/harmony/node_modules
667+
packages/common/node_modules
668+
packages/libs/node_modules
669+
packages/sdk/node_modules
670+
key: npm-cache-${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ steps.patch-file.outputs.patch_checksum }}
671+
restore-keys: |
672+
npm-cache-${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-
673+
674+
- name: Install dependencies (if cache miss)
675+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
676+
env:
677+
CI: true
678+
SKIP_POD_INSTALL: true
679+
SKIP_ANDROID_INSTALL: true
680+
ANDROID_HOME: /tmp/android-sdk-dummy
681+
NODE_OPTIONS: --max-old-space-size=8192
682+
run: |
683+
mkdir -p /tmp/android-sdk-dummy
684+
npm ci --prefer-offline
685+
686+
- name: Run postinstall (if cache hit)
687+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
688+
env:
689+
CI: true
690+
SKIP_POD_INSTALL: true
691+
SKIP_ANDROID_INSTALL: true
692+
ANDROID_HOME: /tmp/android-sdk-dummy
693+
NODE_OPTIONS: --max-old-space-size=8192
694+
run: |
695+
mkdir -p /tmp/android-sdk-dummy
696+
npm run postinstall
697+
653698
- name: Download builds
654699
uses: actions/download-artifact@v4
655700
with:

0 commit comments

Comments
 (0)