@@ -346,10 +346,11 @@ jobs:
346
346
- name : Setup Terraform
347
347
uses : ./.github/actions/setup-tf
348
348
349
- - name : Setup Test Cache
350
- uses : ./.github/actions/setup-test-cache
349
+ - name : Download Test Cache
350
+ id : download-cache
351
+ uses : ./.github/actions/test-cache/download
351
352
with :
352
- key-prefix : test-go
353
+ key-prefix : test-go-${{ runner.os }}-${{ runner.arch }}
353
354
354
355
- name : Test with Mock Database
355
356
id : test
@@ -375,6 +376,11 @@ jobs:
375
376
gotestsum --junitfile="gotests.xml" --jsonfile="gotests.json" \
376
377
--packages="./..." -- $PARALLEL_FLAG -short -failfast
377
378
379
+ - name : Upload Test Cache
380
+ uses : ./.github/actions/test-cache/upload
381
+ with :
382
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
383
+
378
384
- name : Upload test stats to Datadog
379
385
timeout-minutes : 1
380
386
continue-on-error : true
@@ -472,10 +478,11 @@ jobs:
472
478
if : runner.os == 'Windows'
473
479
uses : ./.github/actions/setup-imdisk
474
480
475
- - name : Setup Test Cache
476
- uses : ./.github/actions/setup-test-cache
481
+ - name : Download Test Cache
482
+ id : download-cache
483
+ uses : ./.github/actions/test-cache/download
477
484
with :
478
- key-prefix : test-go-pg
485
+ key-prefix : test-go-pg-${{ runner.os }}-${{ runner.arch }}
479
486
480
487
- name : Test with PostgreSQL Database
481
488
env :
@@ -491,6 +498,11 @@ jobs:
491
498
492
499
make test-postgres
493
500
501
+ - name : Upload Test Cache
502
+ uses : ./.github/actions/test-cache/upload
503
+ with :
504
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
505
+
494
506
- name : Upload test stats to Datadog
495
507
timeout-minutes : 1
496
508
continue-on-error : true
@@ -529,10 +541,11 @@ jobs:
529
541
- name : Setup Terraform
530
542
uses : ./.github/actions/setup-tf
531
543
532
- - name : Setup Test Cache
533
- uses : ./.github/actions/setup-test-cache
544
+ - name : Download Test Cache
545
+ id : download-cache
546
+ uses : ./.github/actions/test-cache/download
534
547
with :
535
- key-prefix : test-go-pg-16
548
+ key-prefix : test-go-pg-16-${{ runner.os }}-${{ runner.arch }}
536
549
537
550
- name : Test with PostgreSQL Database
538
551
env :
@@ -541,6 +554,11 @@ jobs:
541
554
run : |
542
555
make test-postgres
543
556
557
+ - name : Upload Test Cache
558
+ uses : ./.github/actions/test-cache/upload
559
+ with :
560
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
561
+
544
562
- name : Upload test stats to Datadog
545
563
timeout-minutes : 1
546
564
continue-on-error : true
@@ -571,10 +589,11 @@ jobs:
571
589
- name : Setup Terraform
572
590
uses : ./.github/actions/setup-tf
573
591
574
- - name : Setup Test Cache
575
- uses : ./.github/actions/setup-test-cache
592
+ - name : Download Test Cache
593
+ id : download-cache
594
+ uses : ./.github/actions/test-cache/download
576
595
with :
577
- key-prefix : test-go-race
596
+ key-prefix : test-go-race-${{ runner.os }}-${{ runner.arch }}
578
597
579
598
# We run race tests with reduced parallelism because they use more CPU and we were finding
580
599
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
@@ -584,6 +603,11 @@ jobs:
584
603
run : |
585
604
gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
586
605
606
+ - name : Upload Test Cache
607
+ uses : ./.github/actions/test-cache/upload
608
+ with :
609
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
610
+
587
611
- name : Upload test stats to Datadog
588
612
timeout-minutes : 1
589
613
continue-on-error : true
@@ -614,10 +638,11 @@ jobs:
614
638
- name : Setup Terraform
615
639
uses : ./.github/actions/setup-tf
616
640
617
- - name : Setup Test Cache
618
- uses : ./.github/actions/setup-test-cache
641
+ - name : Download Test Cache
642
+ id : download-cache
643
+ uses : ./.github/actions/test-cache/download
619
644
with :
620
- key-prefix : test-go-race-pg
645
+ key-prefix : test-go-race-pg-${{ runner.os }}-${{ runner.arch }}
621
646
622
647
# We run race tests with reduced parallelism because they use more CPU and we were finding
623
648
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
@@ -630,6 +655,11 @@ jobs:
630
655
make test-postgres-docker
631
656
DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
632
657
658
+ - name : Upload Test Cache
659
+ uses : ./.github/actions/test-cache/upload
660
+ with :
661
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
662
+
633
663
- name : Upload test stats to Datadog
634
664
timeout-minutes : 1
635
665
continue-on-error : true
0 commit comments