@@ -98,9 +98,13 @@ functions:
98
98
install-dotnet :
99
99
- command : shell.exec
100
100
params :
101
+ include_expansions_in_env :
102
+ - " OS"
103
+ - " DOTNET_SDK_VERSION"
104
+ - " FRAMEWORK"
101
105
script : |
102
106
${PREPARE_SHELL}
103
- OS=${OS} DOTNET_SDK_VERSION=${DOTNET_SDK_VERSION} bash ${PROJECT_DIRECTORY}/evergreen/install-dotnet.sh
107
+ bash ${PROJECT_DIRECTORY}/evergreen/install-dotnet.sh
104
108
105
109
prepare-resources :
106
110
- command : shell.exec
@@ -352,6 +356,18 @@ functions:
352
356
cd ${DRIVERS_TOOLS}/.evergreen
353
357
DRIVERS_TOOLS=${DRIVERS_TOOLS} MONGODB_URI=${MONGODB_URI} bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh stop
354
358
359
+ run-unit-tests :
360
+ - command : shell.exec
361
+ type : test
362
+ params :
363
+ working_dir : mongo-csharp-driver
364
+ shell : " bash"
365
+ include_expansions_in_env :
366
+ - " FRAMEWORK"
367
+ script : |
368
+ ${PREPARE_SHELL}
369
+ bash evergreen/run-unit-tests.sh
370
+
355
371
run-tests :
356
372
- command : shell.exec
357
373
type : test
@@ -508,7 +524,7 @@ functions:
508
524
509
525
echo "Response Body: $response_body"
510
526
echo "HTTP Status: $http_status"
511
-
527
+
512
528
assume-ec2-role :
513
529
- command : ec2.assume_role
514
530
params :
@@ -1031,6 +1047,36 @@ post:
1031
1047
- func : cleanup
1032
1048
1033
1049
tasks :
1050
+ - name : unit-tests-net472
1051
+ commands :
1052
+ - command : expansions.update
1053
+ params :
1054
+ updates :
1055
+ - key : ' FRAMEWORK'
1056
+ value : ' net472'
1057
+ - func : install-dotnet
1058
+ - func : run-unit-tests
1059
+
1060
+ - name : unit-tests-netstandard21
1061
+ commands :
1062
+ - command : expansions.update
1063
+ params :
1064
+ updates :
1065
+ - key : ' FRAMEWORK'
1066
+ value : ' netstandard2.1'
1067
+ - func : install-dotnet
1068
+ - func : run-unit-tests
1069
+
1070
+ - name : unit-tests-net60
1071
+ commands :
1072
+ - command : expansions.update
1073
+ params :
1074
+ updates :
1075
+ - key : ' FRAMEWORK'
1076
+ value : ' net6.0'
1077
+ - func : install-dotnet
1078
+ - func : run-unit-tests
1079
+
1034
1080
- name : test-net472
1035
1081
commands :
1036
1082
- func : setup-csfle-secrets
@@ -2179,6 +2225,25 @@ task_groups:
2179
2225
- validate-apicompat
2180
2226
2181
2227
buildvariants :
2228
+ - name : unit-tests-windows
2229
+ display_name : Unit Tests on Windows
2230
+ run_on : windows-64-vs2017-test
2231
+ expansions :
2232
+ OS : " windows-64"
2233
+ tasks :
2234
+ - name : unit-tests-net472
2235
+ - name : unit-tests-netstandard21
2236
+ - name : unit-tests-net60
2237
+
2238
+ - name : unit-tests-ubuntu
2239
+ display_name : Unit Tests on Ubuntu
2240
+ run_on : ubuntu2004-small
2241
+ expansions :
2242
+ OS : " ubuntu-2004"
2243
+ tasks :
2244
+ - name : unit-tests-netstandard21
2245
+ - name : unit-tests-net60
2246
+
2182
2247
- matrix_name : stable-api-tests
2183
2248
matrix_spec : { version: ["5.0", "6.0", "7.0", "8.0", "rapid", "latest"], topology: "standalone", auth: "auth", ssl: "nossl", os: "windows-64" }
2184
2249
display_name : " Stable API ${version} ${topology} ${auth} ${ssl} ${os}"
0 commit comments