@@ -341,6 +341,12 @@ jobs:
341
341
- name : Setup Terraform
342
342
uses : ./.github/actions/setup-tf
343
343
344
+ - name : Download Test Cache
345
+ id : download-cache
346
+ uses : ./.github/actions/test-cache/download
347
+ with :
348
+ key-prefix : test-go-${{ runner.os }}-${{ runner.arch }}
349
+
344
350
- name : Test with Mock Database
345
351
id : test
346
352
shell : bash
@@ -365,6 +371,11 @@ jobs:
365
371
gotestsum --junitfile="gotests.xml" --jsonfile="gotests.json" \
366
372
--packages="./..." -- $PARALLEL_FLAG -short -failfast
367
373
374
+ - name : Upload Test Cache
375
+ uses : ./.github/actions/test-cache/upload
376
+ with :
377
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
378
+
368
379
- name : Upload test stats to Datadog
369
380
timeout-minutes : 1
370
381
continue-on-error : true
@@ -462,6 +473,12 @@ jobs:
462
473
if : runner.os == 'Windows'
463
474
uses : ./.github/actions/setup-imdisk
464
475
476
+ - name : Download Test Cache
477
+ id : download-cache
478
+ uses : ./.github/actions/test-cache/download
479
+ with :
480
+ key-prefix : test-go-pg-${{ runner.os }}-${{ runner.arch }}
481
+
465
482
- name : Test with PostgreSQL Database
466
483
env :
467
484
POSTGRES_VERSION : " 13"
@@ -476,6 +493,11 @@ jobs:
476
493
477
494
make test-postgres
478
495
496
+ - name : Upload Test Cache
497
+ uses : ./.github/actions/test-cache/upload
498
+ with :
499
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
500
+
479
501
- name : Upload test stats to Datadog
480
502
timeout-minutes : 1
481
503
continue-on-error : true
@@ -514,13 +536,24 @@ jobs:
514
536
- name : Setup Terraform
515
537
uses : ./.github/actions/setup-tf
516
538
539
+ - name : Download Test Cache
540
+ id : download-cache
541
+ uses : ./.github/actions/test-cache/download
542
+ with :
543
+ key-prefix : test-go-pg-16-${{ runner.os }}-${{ runner.arch }}
544
+
517
545
- name : Test with PostgreSQL Database
518
546
env :
519
547
POSTGRES_VERSION : " 16"
520
548
TS_DEBUG_DISCO : " true"
521
549
run : |
522
550
make test-postgres
523
551
552
+ - name : Upload Test Cache
553
+ uses : ./.github/actions/test-cache/upload
554
+ with :
555
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
556
+
524
557
- name : Upload test stats to Datadog
525
558
timeout-minutes : 1
526
559
continue-on-error : true
@@ -551,6 +584,12 @@ jobs:
551
584
- name : Setup Terraform
552
585
uses : ./.github/actions/setup-tf
553
586
587
+ - name : Download Test Cache
588
+ id : download-cache
589
+ uses : ./.github/actions/test-cache/download
590
+ with :
591
+ key-prefix : test-go-race-${{ runner.os }}-${{ runner.arch }}
592
+
554
593
# We run race tests with reduced parallelism because they use more CPU and we were finding
555
594
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
556
595
# short timeouts are used.
@@ -559,6 +598,11 @@ jobs:
559
598
run : |
560
599
gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
561
600
601
+ - name : Upload Test Cache
602
+ uses : ./.github/actions/test-cache/upload
603
+ with :
604
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
605
+
562
606
- name : Upload test stats to Datadog
563
607
timeout-minutes : 1
564
608
continue-on-error : true
@@ -589,6 +633,12 @@ jobs:
589
633
- name : Setup Terraform
590
634
uses : ./.github/actions/setup-tf
591
635
636
+ - name : Download Test Cache
637
+ id : download-cache
638
+ uses : ./.github/actions/test-cache/download
639
+ with :
640
+ key-prefix : test-go-race-pg-${{ runner.os }}-${{ runner.arch }}
641
+
592
642
# We run race tests with reduced parallelism because they use more CPU and we were finding
593
643
# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
594
644
# short timeouts are used.
@@ -600,6 +650,11 @@ jobs:
600
650
make test-postgres-docker
601
651
DB=ci gotestsum --junitfile="gotests.xml" -- -race -parallel 4 -p 4 ./...
602
652
653
+ - name : Upload Test Cache
654
+ uses : ./.github/actions/test-cache/upload
655
+ with :
656
+ cache-key : ${{ steps.download-cache.outputs.cache-key }}
657
+
603
658
- name : Upload test stats to Datadog
604
659
timeout-minutes : 1
605
660
continue-on-error : true
0 commit comments