@@ -43,6 +43,10 @@ inputs:
4343 description : Whether to persist Vitest's experimental filesystem module cache.
4444 required : false
4545 default : " false"
46+ restore-test-caches :
47+ description : Whether to restore the Vitest transform and test-scope Node compile caches together.
48+ required : false
49+ default : " false"
4650 node-compile-cache :
4751 description : Whether to persist Node's on-disk V8 compile cache.
4852 required : false
@@ -178,7 +182,7 @@ runs:
178182 ${{ github.repository }}-vitest-fs-v3-protected-${{ runner.os }}-${{ runner.arch }}-node-${{ inputs.node-version }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', '**/package.json', '**/tsconfig*.json', 'vitest.config.*', 'test/vitest/**', 'src/state/*.sql', '!**/node_modules/**') }}-
179183
180184 - name : Restore Vitest transform cache
181- if : inputs.vitest-fs-cache == 'true' && inputs.save-vitest-fs-cache != 'true' && runner.os != 'Windows'
185+ if : ( inputs.vitest-fs-cache == 'true' || inputs.restore-test-caches == 'true') && inputs.save-vitest-fs-cache != 'true' && runner.os != 'Windows'
182186 uses : actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
183187 with :
184188 path : /var/tmp/openclaw-vitest-fs-cache
@@ -187,7 +191,7 @@ runs:
187191 ${{ github.repository }}-vitest-fs-v3-protected-${{ runner.os }}-${{ runner.arch }}-node-${{ inputs.node-version }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', '**/package.json', '**/tsconfig*.json', 'vitest.config.*', 'test/vitest/**', 'src/state/*.sql', '!**/node_modules/**') }}-
188192
189193 - name : Configure Vitest transform cache
190- if : inputs.vitest-fs-cache == 'true' && runner.os != 'Windows'
194+ if : ( inputs.vitest-fs-cache == 'true' || inputs.restore-test-caches == 'true') && runner.os != 'Windows'
191195 env :
192196 CACHE_GENERATION : ${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', '**/package.json', '**/tsconfig*.json', 'vitest.config.*', 'test/vitest/**', 'src/state/*.sql', '!**/node_modules/**') }}
193197 CACHE_WRITER : ${{ inputs.save-vitest-fs-cache == 'true' && '1' || '0' }}
@@ -216,7 +220,7 @@ runs:
216220
217221 - name : Select Node compile cache epoch
218222 id : node-compile-cache-epoch
219- if : inputs.node-compile-cache == 'true' && runner.os != 'Windows'
223+ if : ( inputs.node-compile-cache == 'true' || inputs.restore-test-caches == 'true') && runner.os != 'Windows'
220224 shell : bash
221225 env :
222226 CACHE_SCOPE : ${{ inputs.node-compile-cache-scope }}
@@ -238,7 +242,7 @@ runs:
238242 ${{ github.repository }}-node-compile-v3-${{ inputs.node-compile-cache-scope }}-protected-${{ runner.os }}-${{ runner.arch }}-node-${{ inputs.node-version }}-
239243
240244 - name : Restore Node compile cache
241- if : inputs.node-compile-cache == 'true' && inputs.save-node-compile-cache != 'true' && runner.os != 'Windows'
245+ if : ( inputs.node-compile-cache == 'true' || inputs.restore-test-caches == 'true') && inputs.save-node-compile-cache != 'true' && runner.os != 'Windows'
242246 uses : actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
243247 with :
244248 path : /var/tmp/openclaw-node-compile-cache
@@ -247,7 +251,7 @@ runs:
247251 ${{ github.repository }}-node-compile-v3-${{ inputs.node-compile-cache-scope }}-protected-${{ runner.os }}-${{ runner.arch }}-node-${{ inputs.node-version }}-
248252
249253 - name : Configure Node compile cache
250- if : inputs.node-compile-cache == 'true' && runner.os != 'Windows'
254+ if : ( inputs.node-compile-cache == 'true' || inputs.restore-test-caches == 'true') && runner.os != 'Windows'
251255 env :
252256 CACHE_WRITER : ${{ inputs.save-node-compile-cache == 'true' && '1' || '0' }}
253257 shell : bash
0 commit comments