@@ -192,11 +192,13 @@ jobs:
192
192
ref : ${{ env.HEAD_COMMIT }}
193
193
- name : Set up Node
194
194
uses : volta-cli/action@v4
195
+
195
196
- name : Check dependency cache
196
- uses : actions/cache@v3
197
+ uses : actions/cache/restore @v3
197
198
with :
198
199
path : ${{ env.CACHED_DEPENDENCY_PATHS }}
199
200
key : ${{ needs.job_install_deps.outputs.dependency_cache_key }}
201
+ fail-on-cache-miss : true
200
202
201
203
- name : Check build cache
202
204
uses : actions/cache@v3
@@ -245,16 +247,11 @@ jobs:
245
247
ref : ${{ env.HEAD_COMMIT }}
246
248
- name : Set up Node
247
249
uses : volta-cli/action@v4
248
- - name : Check dependency cache
249
- uses : actions/cache/restore@v3
250
- with :
251
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
252
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
253
- - name : Check build cache
254
- uses : actions/cache/restore@v3
255
- with :
256
- path : ${{ env.CACHED_BUILD_PATHS }}
257
- key : ${{ env.BUILD_CACHE_KEY }}
250
+ - name : Restore caches
251
+ uses : ./github/actions/restore-cache
252
+ env :
253
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
254
+
258
255
- name : Get SDK version
259
256
# `jq` reads JSON files, and `tee` pipes its input to the given location and to stdout. (Adding `-a` is the
260
257
# equivalent of using >> rather than >.)
@@ -289,16 +286,10 @@ jobs:
289
286
# The size limit action runs `yarn` and `yarn build` when this job is executed on
290
287
# use Node 14 for now.
291
288
node-version : ' 14'
292
- - name : Check dependency cache
293
- uses : actions/cache/restore@v3
294
- with :
295
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
296
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
297
- - name : Check build cache
298
- uses : actions/cache/restore@v3
299
- with :
300
- path : ${{ env.CACHED_BUILD_PATHS }}
301
- key : ${{ env.BUILD_CACHE_KEY }}
289
+ - name : Restore caches
290
+ uses : ./github/actions/restore-cache
291
+ env :
292
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
302
293
- name : Check bundle sizes
303
294
uses : getsentry/size-limit-action@runForBranch
304
295
with :
@@ -323,16 +314,10 @@ jobs:
323
314
ref : ${{ env.HEAD_COMMIT }}
324
315
- name : Set up Node
325
316
uses : volta-cli/action@v4
326
- - name : Check dependency cache
327
- uses : actions/cache/restore@v3
328
- with :
329
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
330
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
331
- - name : Check build cache
332
- uses : actions/cache/restore@v3
333
- with :
334
- path : ${{ env.CACHED_BUILD_PATHS }}
335
- key : ${{ env.BUILD_CACHE_KEY }}
317
+ - name : Restore caches
318
+ uses : ./github/actions/restore-cache
319
+ env :
320
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
336
321
- name : Run linter
337
322
run : yarn lint
338
323
@@ -348,16 +333,10 @@ jobs:
348
333
ref : ${{ env.HEAD_COMMIT }}
349
334
- name : Set up Node
350
335
uses : volta-cli/action@v4
351
- - name : Check dependency cache
352
- uses : actions/cache/restore@v3
353
- with :
354
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
355
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
356
- - name : Check build cache
357
- uses : actions/cache/restore@v3
358
- with :
359
- path : ${{ env.CACHED_BUILD_PATHS }}
360
- key : ${{ env.BUILD_CACHE_KEY }}
336
+ - name : Restore caches
337
+ uses : ./github/actions/restore-cache
338
+ env :
339
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
361
340
- name : Run madge
362
341
run : yarn circularDepCheck
363
342
@@ -374,16 +353,10 @@ jobs:
374
353
ref : ${{ env.HEAD_COMMIT }}
375
354
- name : Set up Node
376
355
uses : volta-cli/action@v4
377
- - name : Check dependency cache
378
- uses : actions/cache/restore@v3
379
- with :
380
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
381
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
382
- - name : Check build cache
383
- uses : actions/cache/restore@v3
384
- with :
385
- path : ${{ env.CACHED_BUILD_PATHS }}
386
- key : ${{ env.BUILD_CACHE_KEY }}
356
+ - name : Restore caches
357
+ uses : ./github/actions/restore-cache
358
+ env :
359
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
387
360
- name : Pack
388
361
run : yarn build:tarball
389
362
- name : Archive artifacts
@@ -411,16 +384,10 @@ jobs:
411
384
uses : actions/setup-node@v3
412
385
with :
413
386
node-version : ${{ env.DEFAULT_NODE_VERSION }}
414
- - name : Check dependency cache
415
- uses : actions/cache/restore@v3
416
- with :
417
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
418
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
419
- - name : Check build cache
420
- uses : actions/cache/restore@v3
421
- with :
422
- path : ${{ env.CACHED_BUILD_PATHS }}
423
- key : ${{ env.BUILD_CACHE_KEY }}
387
+ - name : Restore caches
388
+ uses : ./github/actions/restore-cache
389
+ env :
390
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
424
391
- name : Run tests
425
392
env :
426
393
NODE_VERSION : 16
@@ -446,16 +413,10 @@ jobs:
446
413
uses : actions/setup-node@v3
447
414
with :
448
415
node-version : ${{ matrix.node }}
449
- - name : Check dependency cache
450
- uses : actions/cache/restore@v3
451
- with :
452
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
453
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
454
- - name : Check build cache
455
- uses : actions/cache/restore@v3
456
- with :
457
- path : ${{ env.CACHED_BUILD_PATHS }}
458
- key : ${{ env.BUILD_CACHE_KEY }}
416
+ - name : Restore caches
417
+ uses : ./github/actions/restore-cache
418
+ env :
419
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
459
420
- name : Run tests
460
421
env :
461
422
NODE_VERSION : ${{ matrix.node }}
@@ -484,16 +445,10 @@ jobs:
484
445
uses : actions/setup-node@v3
485
446
with :
486
447
node-version : ${{ matrix.node }}
487
- - name : Check dependency cache
488
- uses : actions/cache/restore@v3
489
- with :
490
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
491
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
492
- - name : Check build cache
493
- uses : actions/cache/restore@v3
494
- with :
495
- path : ${{ env.CACHED_BUILD_PATHS }}
496
- key : ${{ env.BUILD_CACHE_KEY }}
448
+ - name : Restore caches
449
+ uses : ./github/actions/restore-cache
450
+ env :
451
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
497
452
- name : Get npm cache directory
498
453
id : npm-cache-dir
499
454
run : echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
@@ -558,16 +513,10 @@ jobs:
558
513
ref : ${{ env.HEAD_COMMIT }}
559
514
- name : Set up Node
560
515
uses : volta-cli/action@v4
561
- - name : Check dependency cache
562
- uses : actions/cache/restore@v3
563
- with :
564
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
565
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
566
- - name : Check build cache
567
- uses : actions/cache/restore@v3
568
- with :
569
- path : ${{ env.CACHED_BUILD_PATHS }}
570
- key : ${{ env.BUILD_CACHE_KEY }}
516
+ - name : Restore caches
517
+ uses : ./github/actions/restore-cache
518
+ env :
519
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
571
520
- name : Get npm cache directory
572
521
id : npm-cache-dir
573
522
run : echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
@@ -616,16 +565,10 @@ jobs:
616
565
ref : ${{ env.HEAD_COMMIT }}
617
566
- name : Set up Node
618
567
uses : volta-cli/action@v4
619
- - name : Check dependency cache
620
- uses : actions/cache/restore@v3
621
- with :
622
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
623
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
624
- - name : Check build cache
625
- uses : actions/cache/restore@v3
626
- with :
627
- path : ${{ env.CACHED_BUILD_PATHS }}
628
- key : ${{ env.BUILD_CACHE_KEY }}
568
+ - name : Restore caches
569
+ uses : ./github/actions/restore-cache
570
+ env :
571
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
629
572
- name : Run integration tests
630
573
env :
631
574
KARMA_BROWSER : ${{ matrix.browser }}
@@ -646,16 +589,10 @@ jobs:
646
589
ref : ${{ env.HEAD_COMMIT }}
647
590
- name : Set up Node
648
591
uses : volta-cli/action@v4
649
- - name : Check dependency cache
650
- uses : actions/cache/restore@v3
651
- with :
652
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
653
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
654
- - name : Check build cache
655
- uses : actions/cache/restore@v3
656
- with :
657
- path : ${{ env.CACHED_BUILD_PATHS }}
658
- key : ${{ env.BUILD_CACHE_KEY }}
592
+ - name : Restore caches
593
+ uses : ./github/actions/restore-cache
594
+ env :
595
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
659
596
- name : Run browser build tests
660
597
run : |
661
598
cd packages/browser
@@ -684,16 +621,10 @@ jobs:
684
621
uses : actions/setup-node@v3
685
622
with :
686
623
node-version : ${{ matrix.node }}
687
- - name : Check dependency cache
688
- uses : actions/cache/restore@v3
689
- with :
690
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
691
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
692
- - name : Check build cache
693
- uses : actions/cache/restore@v3
694
- with :
695
- path : ${{ env.CACHED_BUILD_PATHS }}
696
- key : ${{ env.BUILD_CACHE_KEY }}
624
+ - name : Restore caches
625
+ uses : ./github/actions/restore-cache
626
+ env :
627
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
697
628
- name : Run integration tests
698
629
env :
699
630
NODE_VERSION : ${{ matrix.node }}
@@ -720,16 +651,10 @@ jobs:
720
651
uses : actions/setup-node@v3
721
652
with :
722
653
node-version : ${{ matrix.node }}
723
- - name : Check dependency cache
724
- uses : actions/cache/restore@v3
725
- with :
726
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
727
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
728
- - name : Check build cache
729
- uses : actions/cache/restore@v3
730
- with :
731
- path : ${{ env.CACHED_BUILD_PATHS }}
732
- key : ${{ env.BUILD_CACHE_KEY }}
654
+ - name : Restore caches
655
+ uses : ./github/actions/restore-cache
656
+ env :
657
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
733
658
- name : Run integration tests
734
659
env :
735
660
NODE_VERSION : ${{ matrix.node }}
@@ -754,16 +679,10 @@ jobs:
754
679
ref : ${{ env.HEAD_COMMIT }}
755
680
- name : Set up Node
756
681
uses : volta-cli/action@v4
757
- - name : Check dependency cache
758
- uses : actions/cache/restore@v3
759
- with :
760
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
761
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
762
- - name : Check build cache
763
- uses : actions/cache/restore@v3
764
- with :
765
- path : ${{ env.CACHED_BUILD_PATHS }}
766
- key : ${{ env.BUILD_CACHE_KEY }}
682
+ - name : Restore caches
683
+ uses : ./github/actions/restore-cache
684
+ env :
685
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
767
686
- name : Get node version
768
687
id : versions
769
688
run : |
@@ -817,16 +736,10 @@ jobs:
817
736
ref : ${{ env.HEAD_COMMIT }}
818
737
- name : Set up Node
819
738
uses : volta-cli/action@v4
820
- - name : Check dependency cache
821
- uses : actions/cache/restore@v3
822
- with :
823
- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
824
- key : ${{ needs.job_build.outputs.dependency_cache_key }}
825
- - name : Check build cache
826
- uses : actions/cache/restore@v3
827
- with :
828
- path : ${{ env.CACHED_BUILD_PATHS }}
829
- key : ${{ env.BUILD_CACHE_KEY }}
739
+ - name : Restore caches
740
+ uses : ./github/actions/restore-cache
741
+ env :
742
+ DEPENDENCY_CACHE_KEY : ${{ needs.job_build.outputs.dependency_cache_key }}
830
743
831
744
- name : Collect
832
745
run : yarn ci:collect
0 commit comments