-
Notifications
You must be signed in to change notification settings - Fork 2.1k
993 lines (953 loc) · 36.1 KB
/
Copy pathci.yml
File metadata and controls
993 lines (953 loc) · 36.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
name: .NET CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
types:
- checks_requested
permissions:
contents: read
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
# Docker images started by workflow steps are centralized so pulls can be retried and mirrors can be swapped in one place.
AZURITE_IMAGE: mcr.microsoft.com/azure-storage/azurite:3.35.0@sha256:647c63a91102a9d8e8000aab803436e1fc85fbb285e7ce830a82ee5d6661cf37
EVENTHUBS_EMULATOR_IMAGE: mcr.microsoft.com/azure-messaging/eventhubs-emulator:2.2.0@sha256:2c8e0d4dd93a5fc078df2721eeb3e211442d555d61293ac3972df931c6d9333a
COSMOSDB_EMULATOR_IMAGE: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview@sha256:bf3bd3cbe3fae2005a0745f77b01d1fc8cd04112193f3ee32289ee15ee9ae5fa
CONSUL_IMAGE: public.ecr.aws/hashicorp/consul:1.19
DYNAMODB_IMAGE: amazon/dynamodb-local:latest
ELASTICMQ_IMAGE: softwaremill/elasticmq-native:latest
MSSQL_IMAGE: mcr.microsoft.com/mssql/server:latest
NATS_IMAGE: nats:latest
POSTGRES_IMAGE: postgres
REDIS_IMAGE: redis
TESTCONTAINERS_RYUK_IMAGE: testcontainers/ryuk:0.14.0
ZOOKEEPER_IMAGE: zookeeper:3.9
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24.x'
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Build
run: dotnet build -bl
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
continue-on-error: true
with:
name: build_log_${{ matrix.os }}
retention-days: 1
path: |
**/*.binlog
test-redis:
name: Redis provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
strategy:
matrix:
provider: ["Redis"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start Redis
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$REDIS_IMAGE"
docker run -d --pull=never --name redis \
-p 6379:6379 \
--health-cmd "redis-cli ping" \
--health-interval 10s \
--health-timeout 5s \
--health-retries 5 \
"$REDIS_IMAGE"
bash .github/scripts/docker-wait-for-health.sh redis
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
ORLEANSREDISCONNECTIONSTRING: "localhost:6379,ssl=False,abortConnect=False"
- name: Clean up Redis
if: always()
run: docker rm -f redis || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-cassandra:
name: Cassandra provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
CASSANDRA_IMAGE: cassandra:${{ matrix.dbversion }}
strategy:
matrix:
provider: ["Cassandra"]
dbversion: ["4.0", "4.1", "5.0"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Pre-pull Cassandra test images
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$TESTCONTAINERS_RYUK_IMAGE"
bash .github/scripts/docker-pull-with-retry.sh "$CASSANDRA_IMAGE"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Clustering)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.dbversion }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
CASSANDRAVERSION: ${{ matrix.dbversion }}
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.dbversion }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-postgres:
name: PostgreSQL provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
POSTGRES_PASSWORD: postgres
strategy:
matrix:
provider: ["PostgreSql"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start PostgreSQL
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$POSTGRES_IMAGE"
docker run -d --pull=never --name postgres \
-p 5432:5432 \
-e POSTGRES_PASSWORD="$POSTGRES_PASSWORD" \
--health-cmd "pg_isready -U postgres" \
--health-interval 10s \
--health-timeout 5s \
--health-retries 5 \
"$POSTGRES_IMAGE"
bash .github/scripts/docker-wait-for-health.sh postgres
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="False positive")]
ORLEANSPOSTGRESCONNECTIONSTRING: "Server=127.0.0.1;Port=5432;Pooling=false;User Id=postgres;Password=postgres;SSL Mode=Disable"
- name: Clean up PostgreSQL
if: always()
run: docker rm -f postgres || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-mariadb:
name: MariaDB/MySQL provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
# The official MariaDB 10.6 image is not published to GHCR. Use Google's Docker Hub mirror
# pinned to the official Docker Hub digest.
MARIADB_IMAGE: mirror.gcr.io/library/mariadb:10.6@sha256:daacc2f260f8ec999daa5e03a017a23a7e6fa3fb982aaf26e8b72f24daf03bc9
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
MARIADB_ROOT_PASSWORD: "mariadb"
strategy:
matrix:
provider: ["MySql"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Start MariaDB
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$MARIADB_IMAGE"
docker run -d --pull=never --name mariadb \
-p 3306:3306 \
-e MARIADB_ROOT_PASSWORD="$MARIADB_ROOT_PASSWORD" \
--health-cmd "mariadb-admin ping -h 127.0.0.1 -uroot -p${MARIADB_ROOT_PASSWORD} --silent" \
--health-interval 5s \
--health-timeout 5s \
--health-retries 24 \
"$MARIADB_IMAGE"
for attempt in $(seq 1 60); do
status="$(docker inspect --format '{{.State.Health.Status}}' mariadb)"
case "$status" in
healthy)
exit 0
;;
unhealthy)
docker logs mariadb
exit 1
;;
esac
sleep 2
done
echo "MariaDB did not become healthy in time."
docker logs mariadb
exit 1
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSMYSQLCONNECTIONSTRING: "Server=127.0.0.1;Port=3306;UId=root;Pwd=mariadb;"
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-sqlserver:
name: Microsoft SQL Server provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
ACCEPT_EULA: "Y"
MSSQL_PID: "Developer"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
SA_PASSWORD: "yourWeak(!)Password"
strategy:
matrix:
provider: ["SqlServer"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start SQL Server
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$MSSQL_IMAGE"
docker run -d --pull=never --name mssql \
-p 1433:1433 \
-e ACCEPT_EULA="$ACCEPT_EULA" \
-e MSSQL_PID="$MSSQL_PID" \
-e SA_PASSWORD="$SA_PASSWORD" \
"$MSSQL_IMAGE"
echo "Waiting for SQL Server to accept TCP connections..."
timeout 120 bash -c 'until nc -z localhost 1433; do sleep 2; done'
echo "SQL Server is accepting TCP connections"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSMSSQLCONNECTIONSTRING: "Server=127.0.0.1,1433;User Id=SA;Password=yourWeak(!)Password;TrustServerCertificate=True;"
- name: Clean up SQL Server
if: always()
run: docker rm -f mssql || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-azure-storage:
name: Azure Storage provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
strategy:
matrix:
framework: ["net8.0", "net10.0"]
provider: ["AzureStorage"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start Azurite
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$AZURITE_IMAGE"
docker run -d --pull=never --name azurite \
-p 10000:10000 \
-p 10001:10001 \
-p 10002:10002 \
"$AZURITE_IMAGE" \
azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --skipApiVersionCheck
- name: Wait for Azurite
run: |
echo "Waiting for Azurite to be ready..."
timeout 60 bash -c 'until nc -z localhost 10000 && nc -z localhost 10001 && nc -z localhost 10002; do sleep 1; done'
echo "Azurite is ready"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--framework ${{ matrix.framework }}
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
# [SuppressMessage("Microsoft.Security", "CSCAN0090:ConfigFile", Justification="Not a secret")]
# [SuppressMessage("Microsoft.Security", "CSCAN0220:DefaultPasswordContexts", Justification="Not a secret")]
ORLEANSDATACONNECTIONSTRING: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;"
- name: Clean up Azurite
if: always()
run: docker rm -f azurite || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-azure-eventhubs:
name: Azure Event Hubs provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
strategy:
matrix:
framework: ["net8.0", "net10.0"]
provider: ["EventHub"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start Azurite
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$AZURITE_IMAGE"
docker run -d --pull=never --name azurite \
-p 10000:10000 \
-p 10001:10001 \
-p 10002:10002 \
"$AZURITE_IMAGE" \
azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --skipApiVersionCheck
- name: Wait for Azurite
run: |
echo "Waiting for Azurite to be ready..."
timeout 60 bash -c 'until nc -z localhost 10000 && nc -z localhost 10001 && nc -z localhost 10002; do sleep 1; done'
echo "Azurite is ready"
- name: Start Event Hubs emulator
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$EVENTHUBS_EMULATOR_IMAGE"
docker run -d --pull=never --name eventhubs-emulator \
-v ${{ github.workspace }}/.github/eventhubs-emulator/Config.json:/Eventhubs_Emulator/ConfigFiles/Config.json \
-p 5672:5672 \
-e BLOB_SERVER=host.docker.internal \
-e METADATA_SERVER=host.docker.internal \
-e ACCEPT_EULA=Y \
--add-host=host.docker.internal:host-gateway \
"$EVENTHUBS_EMULATOR_IMAGE"
- name: Wait for Event Hubs emulator
run: |
echo "Waiting for Event Hubs emulator to be ready..."
timeout 60 bash -c 'until nc -z localhost 5672; do sleep 1; done'
echo "Event Hubs emulator is ready"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional|Category=Streaming)"
--framework ${{ matrix.framework }}
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
# [SuppressMessage("Microsoft.Security", "CSCAN0090:ConfigFile", Justification="Not a secret")]
# [SuppressMessage("Microsoft.Security", "CSCAN0220:DefaultPasswordContexts", Justification="Not a secret")]
ORLEANSEVENTHUBCONNECTIONSTRING: "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSDATACONNECTIONSTRING: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;"
- name: Clean up Event Hubs emulator
if: always()
run: docker rm -f eventhubs-emulator || true
- name: Clean up Azurite
if: always()
run: docker rm -f azurite || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-azure-cosmosdb:
name: Azure Cosmos DB provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
strategy:
matrix:
framework: ["net8.0", "net10.0"]
provider: ["Cosmos"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Start Azure Cosmos DB emulator
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$COSMOSDB_EMULATOR_IMAGE"
docker run -d --pull=never --name cosmosdb-emulator \
-p 8081:8081 \
-e PROTOCOL=https \
-e ENABLE_EXPLORER=false \
-e ENABLE_TELEMETRY=false \
-e LOG_LEVEL=warn \
"$COSMOSDB_EMULATOR_IMAGE"
- name: Wait for Azure Cosmos DB emulator
run: |
endpoint="https://localhost:8081/"
echo "Waiting for Azure Cosmos DB emulator to be ready..."
for i in {1..60}; do
if curl --silent --show-error --insecure "${endpoint}" > /dev/null; then
echo "Azure Cosmos DB emulator is ready"
echo "ORLEANSCOSMOSDBACCOUNTENDPOINT=${endpoint}" >> "$GITHUB_ENV"
exit 0
fi
if [ "$i" -eq 60 ]; then
docker logs --tail 200 cosmosdb-emulator
echo "Azure Cosmos DB emulator did not become ready in time."
exit 1
fi
sleep 2
done
- name: Test
run: |
cosmos_filter='Category=${{ matrix.provider }}&Category!=Performance&Category!=Stress'
for attempt in 1 2; do
logger_name="test_results_${{ matrix.provider }}_${{ matrix.framework }}_attempt${attempt}.trx"
extra_args=()
if [ "$attempt" -gt 1 ]; then
echo "Cosmos tests failed on attempt $((attempt - 1)); retrying once with the same filter."
extra_args+=(--no-build)
fi
if dotnet test \
test/Extensions/Orleans.Cosmos.Tests/Orleans.Cosmos.Tests.csproj \
--framework ${{ matrix.framework }} \
--filter "${cosmos_filter}" \
--blame-hang-timeout 10m \
--blame-crash-dump-type full \
--blame-hang-dump-type full \
--logger "trx;LogFileName=${logger_name}" \
"${extra_args[@]}" \
-- \
-parallel none -noshadow; then
exit 0
fi
done
exit 1
env:
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
#ORLEANSCOSMOSDBACCOUNTENDPOINT: "https://localhost:8081/"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSCOSMOSDBACCOUNTKEY: "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="
- name: Clean up Azure Cosmos DB emulator
if: always()
run: docker rm -f cosmosdb-emulator || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-consul:
name: Consul provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
strategy:
matrix:
provider: ["Consul"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Pre-pull Consul test images
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$TESTCONTAINERS_RYUK_IMAGE"
bash .github/scripts/docker-pull-with-retry.sh "$CONSUL_IMAGE"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-zookeeper:
name: ZooKeeper provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
strategy:
matrix:
provider: ["ZooKeeper"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start ZooKeeper
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$ZOOKEEPER_IMAGE"
docker run -d --pull=never --name zookeeper \
-p 2181:2181 \
"$ZOOKEEPER_IMAGE"
echo "Waiting for ZooKeeper to accept TCP connections..."
timeout 60 bash -c 'until nc -z localhost 2181; do sleep 1; done'
echo "ZooKeeper is accepting TCP connections"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
ORLEANSZOOKEEPERCONNECTIONSTRING: "localhost:2181"
- name: Clean up ZooKeeper
if: always()
run: docker rm -f zookeeper || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-dynamodb:
name: AWS DynamoDB provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
AWS_ACCESS_KEY_ID: root
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
AWS_SECRET_ACCESS_KEY: pass
AWS_REGION: us-east-1
strategy:
matrix:
provider: ["DynamoDB"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start DynamoDB Local
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$DYNAMODB_IMAGE"
docker run -d --pull=never --name dynamodb \
-p 8000:8000 \
-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \
-e AWS_REGION="$AWS_REGION" \
"$DYNAMODB_IMAGE"
echo "Waiting for DynamoDB Local to accept TCP connections..."
timeout 60 bash -c 'until nc -z localhost 8000; do sleep 1; done'
echo "DynamoDB Local is accepting TCP connections"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}&(Category=BVT|Category=SlowBVT|Category=Functional)"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
ORLEANSDYNAMODBSERVICE: "http://127.0.0.1:8000"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSDYNAMODBACCESSKEY: "root"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSDYNAMODBSECRETKEY: "pass"
- name: Clean up DynamoDB Local
if: always()
run: docker rm -f dynamodb || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-sqs:
name: AWS SQS provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
AWS_ACCESS_KEY_ID: root
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
AWS_SECRET_ACCESS_KEY: pass
AWS_REGION: us-east-1
strategy:
matrix:
provider: ["SQS"]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@v4
- name: Start DynamoDB Local
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$DYNAMODB_IMAGE"
docker run -d --pull=never --name dynamodb \
-p 8000:8000 \
-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \
-e AWS_REGION="$AWS_REGION" \
"$DYNAMODB_IMAGE"
- name: Start ElasticMQ
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$ELASTICMQ_IMAGE"
docker run -d --pull=never --name elasticmq \
-p 9324:9324 \
"$ELASTICMQ_IMAGE"
- name: Wait for ElasticMQ and DynamoDB
run: |
echo "Waiting for ElasticMQ and DynamoDB Local to be ready..."
timeout 60 bash -c 'until nc -z localhost 9324 && nc -z localhost 8000; do sleep 1; done'
echo "ElasticMQ and DynamoDB Local are ready"
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Test
run: dotnet test
test/Extensions/Orleans.AWS.Tests/Orleans.AWS.Tests.csproj
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
env:
ORLEANSSQSCONNECTIONSTRING: "Service=http://127.0.0.1:9324"
ORLEANSDYNAMODBSERVICE: "http://127.0.0.1:8000"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSDYNAMODBACCESSKEY: "root"
# [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Not a secret")]
ORLEANSDYNAMODBSECRETKEY: "pass"
- name: Clean up ElasticMQ
if: always()
run: docker rm -f elasticmq || true
- name: Clean up DynamoDB Local
if: always()
run: docker rm -f dynamodb || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-nats:
name: NATS stream provider tests
runs-on: ubuntu-latest
continue-on-error: true
env:
BuildExternalAssets: "false"
strategy:
matrix:
provider: ["NATS"]
framework: ["net8.0", "net10.0"]
# services:
# nats:
# image: nats:latest
# ports:
# - 4222:4222
# - 8222:8222
# env:
# HTTP_PORT: 8222
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Start NATS
shell: bash
run: |
set -euo pipefail
bash .github/scripts/docker-pull-with-retry.sh "$NATS_IMAGE"
docker run -d --pull=never --name nats \
-p 4222:4222 \
-p 8222:8222 \
"$NATS_IMAGE" \
--js --http_port=8222
- name: Wait for NATS
run: |
echo "Waiting for NATS to be ready..."
if ! timeout 60 bash -c 'until docker logs nats 2>&1 | grep -q "Server is ready"; do sleep 1; done'; then
docker logs nats
exit 1
fi
echo "NATS is ready"
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test
run: dotnet test
test/Extensions/Orleans.Streaming.NATS.Tests/Orleans.Streaming.NATS.Tests.csproj
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.provider }}"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.provider }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
- name: Clean up container
if: always()
run: docker rm -f nats || true
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test:
name: Test
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
suite: [BVT, SlowBVT, Functional]
os: [ubuntu-latest, windows-latest, macos-latest]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24.x'
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Build
run: dotnet build
- name: Test
run: dotnet test
--framework ${{ matrix.framework }}
--filter "Category=${{ matrix.suite }}&Category!=Consul"
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.suite }}_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.suite }}_${{ matrix.os }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*
test-codegenerator:
name: Test Code Generator
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
framework: ["net8.0", "net10.0"]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: global.json
- name: Test Code Generator
run: dotnet test
test/Orleans.CodeGenerator.Tests/Orleans.CodeGenerator.Tests.csproj
--framework ${{ matrix.framework }}
--blame-hang-timeout 10m
--blame-crash-dump-type full
--blame-hang-dump-type full
--logger "trx;LogFileName=test_results_${{ matrix.framework }}.trx"
--
-parallel none -noshadow
- name: Archive Test Results
if: always()
continue-on-error: true
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: test_output_${{ github.job }}_${{ matrix.os }}_${{ matrix.framework }}
retention-days: 1
path: |
**/TestResults/*
**/logs/*