@@ -169,27 +169,12 @@ jobs:
169169 mv tmp/corebridge-*/* ./
170170 rm -rf tmp
171171
172- - name : Install Node
173- uses : actions/setup-node@v4
172+ - name : Setup Node and Install Dependencies
173+ id : setup-node
174+ uses : ./.github/actions/setup-node-deps
174175 with :
175- node-version : 22
176-
177- - name : Get NPM cache directory
178- id : npm-cache-dir
179- run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
180-
181- - name : Restore NPM cache
182- uses : actions/cache/restore@v4
183- with :
184- path : ${{ steps.npm-cache-dir.outputs.dir }}
185- key : npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
186- restore-keys : |
187- npm-main-${{ matrix.platform }}-
188-
189- - name : Download dependencies
190- # Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors :(
191- run : |
192- npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
176+ node-version : ' 22'
177+ platform : ${{ matrix.platform }}
193178
194179 - name : Compile code
195180 run : npm run build -- --ignore @temporalio/core-bridge
@@ -208,7 +193,7 @@ jobs:
208193 # Only saves NPM cache from the main branch, to reduce pressure on the cache (limited to 10GB).
209194 if : ${{ env.IS_MAIN_OR_RELEASE == 'true' }}
210195 with :
211- path : ${{ steps.npm-cache-dir .outputs.dir }}
196+ path : ${{ steps.setup-node .outputs.cache- dir }}
212197 key : npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
213198
214199 # Tests that npm init @temporalio results in a working worker and client
@@ -258,28 +243,11 @@ jobs:
258243 # We don't need the core submodule here since won't build the project
259244 submodules : false
260245
261- - name : Install Node
262- uses : actions/setup-node@v4
246+ - name : Setup Node and Install Dependencies
247+ uses : ./.github/ actions/setup-node-deps
263248 with :
264249 node-version : ${{ matrix.node }}
265-
266- - name : Get NPM cache directory
267- id : npm-cache-dir
268- shell : bash
269- run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
270-
271- - name : Restore NPM cache
272- uses : actions/cache/restore@v4
273- with :
274- path : ${{ steps.npm-cache-dir.outputs.dir }}
275- key : npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
276- restore-keys : |
277- npm-main-${{ matrix.platform }}-
278-
279- # No need to compile anything, we just need the package ./scripts and their dependencies
280- - name : Install dependencies without compilation
281- run : |
282- npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
250+ platform : ${{ matrix.platform }}
283251
284252 - name : Restore Verdaccio repo artifact
285253 uses : actions/download-artifact@v4
0 commit comments