4444 restore-keys : |
4545 ${{ runner.os }}-pnpm-cache
4646
47+ - name : Lookup nx cache
48+ id : lookup-nx-cache
49+ uses : actions/cache/restore@v5
50+ with :
51+ path : |
52+ .nx/cache
53+ .nx/workspace-data/*.db
54+ .nx/workspace-data/*.db-wal
55+ .nx/workspace-data/*.db-shm
56+ key : ${{ runner.os }}-nx-v2-${{ github.job }}-${{ github.sha }}-${{ github.run_attempt }}
57+ restore-keys : |
58+ ${{ runner.os }}-nx-v2-${{ github.job }}-
59+ ${{ runner.os }}-nx-v2-
60+
61+ lookup-only : true
62+
4763 - name : Setup nx cache
4864 id : setup-nx-cache
4965 uses : actions/cache@v5
@@ -61,15 +77,15 @@ jobs:
6177 - name : Show nx cache status
6278 shell : bash
6379 run : |
64- echo "Nx cache hit: ${{ steps.setup -nx-cache.outputs.cache-hit }}"
65- echo "Nx cache primary key: ${{ steps.setup -nx-cache.outputs.cache-primary-key }}"
66- echo "Nx cache matched key: ${{ steps.setup -nx-cache.outputs.cache-matched-key }}"
67- if [ -z "${{ steps.setup -nx-cache.outputs.cache-matched-key }}" ]; then
68- echo "Nx cache restore : miss"
69- elif [ "${{ steps.setup -nx-cache.outputs.cache-hit }}" = "true" ]; then
70- echo "Nx cache restore : exact hit"
80+ echo "Nx cache lookup exact hit: ${{ steps.lookup -nx-cache.outputs.cache-hit }}"
81+ echo "Nx cache primary key: ${{ steps.lookup -nx-cache.outputs.cache-primary-key }}"
82+ echo "Nx cache matched key: ${{ steps.lookup -nx-cache.outputs.cache-matched-key }}"
83+ if [ -z "${{ steps.lookup -nx-cache.outputs.cache-matched-key }}" ]; then
84+ echo "Nx cache lookup : miss"
85+ elif [ "${{ steps.lookup -nx-cache.outputs.cache-hit }}" = "true" ]; then
86+ echo "Nx cache lookup : exact hit"
7187 else
72- echo "Nx cache restore : partial hit via restore-keys"
88+ echo "Nx cache lookup : partial hit via restore-keys"
7389 fi
7490
7591 - name : Install dependencies
@@ -127,6 +143,22 @@ jobs:
127143 restore-keys : |
128144 ${{ runner.os }}-pnpm-cache
129145
146+ - name : Lookup nx cache
147+ id : lookup-nx-cache
148+ uses : actions/cache/restore@v5
149+ with :
150+ path : |
151+ .nx/cache
152+ .nx/workspace-data/*.db
153+ .nx/workspace-data/*.db-wal
154+ .nx/workspace-data/*.db-shm
155+ key : ${{ runner.os }}-nx-v2-${{ github.job }}-${{ github.sha }}-${{ github.run_attempt }}
156+ restore-keys : |
157+ ${{ runner.os }}-nx-v2-${{ github.job }}-
158+ ${{ runner.os }}-nx-v2-
159+
160+ lookup-only : true
161+
130162 - name : Setup nx cache
131163 id : setup-nx-cache
132164 uses : actions/cache@v5
@@ -144,15 +176,15 @@ jobs:
144176 - name : Show nx cache status
145177 shell : bash
146178 run : |
147- echo "Nx cache hit: ${{ steps.setup -nx-cache.outputs.cache-hit }}"
148- echo "Nx cache primary key: ${{ steps.setup -nx-cache.outputs.cache-primary-key }}"
149- echo "Nx cache matched key: ${{ steps.setup -nx-cache.outputs.cache-matched-key }}"
150- if [ -z "${{ steps.setup -nx-cache.outputs.cache-matched-key }}" ]; then
151- echo "Nx cache restore : miss"
152- elif [ "${{ steps.setup -nx-cache.outputs.cache-hit }}" = "true" ]; then
153- echo "Nx cache restore : exact hit"
179+ echo "Nx cache lookup exact hit: ${{ steps.lookup -nx-cache.outputs.cache-hit }}"
180+ echo "Nx cache primary key: ${{ steps.lookup -nx-cache.outputs.cache-primary-key }}"
181+ echo "Nx cache matched key: ${{ steps.lookup -nx-cache.outputs.cache-matched-key }}"
182+ if [ -z "${{ steps.lookup -nx-cache.outputs.cache-matched-key }}" ]; then
183+ echo "Nx cache lookup : miss"
184+ elif [ "${{ steps.lookup -nx-cache.outputs.cache-hit }}" = "true" ]; then
185+ echo "Nx cache lookup : exact hit"
154186 else
155- echo "Nx cache restore : partial hit via restore-keys"
187+ echo "Nx cache lookup : partial hit via restore-keys"
156188 fi
157189
158190 - name : Install dependencies
@@ -197,6 +229,22 @@ jobs:
197229 restore-keys : |
198230 ${{ runner.os }}-pnpm-cache
199231
232+ - name : Lookup nx cache
233+ id : lookup-nx-cache
234+ uses : actions/cache/restore@v5
235+ with :
236+ path : |
237+ .nx/cache
238+ .nx/workspace-data/*.db
239+ .nx/workspace-data/*.db-wal
240+ .nx/workspace-data/*.db-shm
241+ key : ${{ runner.os }}-nx-v2-${{ github.job }}-${{ github.sha }}-${{ github.run_attempt }}
242+ restore-keys : |
243+ ${{ runner.os }}-nx-v2-${{ github.job }}-
244+ ${{ runner.os }}-nx-v2-
245+
246+ lookup-only : true
247+
200248 - name : Setup nx cache
201249 id : setup-nx-cache
202250 uses : actions/cache@v5
@@ -214,15 +262,15 @@ jobs:
214262 - name : Show nx cache status
215263 shell : bash
216264 run : |
217- echo "Nx cache hit: ${{ steps.setup -nx-cache.outputs.cache-hit }}"
218- echo "Nx cache primary key: ${{ steps.setup -nx-cache.outputs.cache-primary-key }}"
219- echo "Nx cache matched key: ${{ steps.setup -nx-cache.outputs.cache-matched-key }}"
220- if [ -z "${{ steps.setup -nx-cache.outputs.cache-matched-key }}" ]; then
221- echo "Nx cache restore : miss"
222- elif [ "${{ steps.setup -nx-cache.outputs.cache-hit }}" = "true" ]; then
223- echo "Nx cache restore : exact hit"
265+ echo "Nx cache lookup exact hit: ${{ steps.lookup -nx-cache.outputs.cache-hit }}"
266+ echo "Nx cache primary key: ${{ steps.lookup -nx-cache.outputs.cache-primary-key }}"
267+ echo "Nx cache matched key: ${{ steps.lookup -nx-cache.outputs.cache-matched-key }}"
268+ if [ -z "${{ steps.lookup -nx-cache.outputs.cache-matched-key }}" ]; then
269+ echo "Nx cache lookup : miss"
270+ elif [ "${{ steps.lookup -nx-cache.outputs.cache-hit }}" = "true" ]; then
271+ echo "Nx cache lookup : exact hit"
224272 else
225- echo "Nx cache restore : partial hit via restore-keys"
273+ echo "Nx cache lookup : partial hit via restore-keys"
226274 fi
227275
228276 - name : Install dependencies
@@ -308,6 +356,22 @@ jobs:
308356 restore-keys : |
309357 ${{ runner.os }}-pnpm-cache
310358
359+ - name : Lookup nx cache
360+ id : lookup-nx-cache
361+ uses : actions/cache/restore@v5
362+ with :
363+ path : |
364+ .nx/cache
365+ .nx/workspace-data/*.db
366+ .nx/workspace-data/*.db-wal
367+ .nx/workspace-data/*.db-shm
368+ key : ${{ runner.os }}-nx-v2-${{ github.job }}-${{ github.sha }}-${{ github.run_attempt }}
369+ restore-keys : |
370+ ${{ runner.os }}-nx-v2-${{ github.job }}-
371+ ${{ runner.os }}-nx-v2-
372+
373+ lookup-only : true
374+
311375 - name : Setup nx cache
312376 id : setup-nx-cache
313377 uses : actions/cache@v5
@@ -325,15 +389,15 @@ jobs:
325389 - name : Show nx cache status
326390 shell : bash
327391 run : |
328- echo "Nx cache hit: ${{ steps.setup -nx-cache.outputs.cache-hit }}"
329- echo "Nx cache primary key: ${{ steps.setup -nx-cache.outputs.cache-primary-key }}"
330- echo "Nx cache matched key: ${{ steps.setup -nx-cache.outputs.cache-matched-key }}"
331- if [ -z "${{ steps.setup -nx-cache.outputs.cache-matched-key }}" ]; then
332- echo "Nx cache restore : miss"
333- elif [ "${{ steps.setup -nx-cache.outputs.cache-hit }}" = "true" ]; then
334- echo "Nx cache restore : exact hit"
392+ echo "Nx cache lookup exact hit: ${{ steps.lookup -nx-cache.outputs.cache-hit }}"
393+ echo "Nx cache primary key: ${{ steps.lookup -nx-cache.outputs.cache-primary-key }}"
394+ echo "Nx cache matched key: ${{ steps.lookup -nx-cache.outputs.cache-matched-key }}"
395+ if [ -z "${{ steps.lookup -nx-cache.outputs.cache-matched-key }}" ]; then
396+ echo "Nx cache lookup : miss"
397+ elif [ "${{ steps.lookup -nx-cache.outputs.cache-hit }}" = "true" ]; then
398+ echo "Nx cache lookup : exact hit"
335399 else
336- echo "Nx cache restore : partial hit via restore-keys"
400+ echo "Nx cache lookup : partial hit via restore-keys"
337401 fi
338402
339403 - name : Install dependencies
0 commit comments