@@ -98,9 +98,13 @@ functions:
9898 install-dotnet :
9999 - command : shell.exec
100100 params :
101+ include_expansions_in_env :
102+ - " OS"
103+ - " DOTNET_SDK_VERSION"
104+ - " FRAMEWORK"
101105 script : |
102106 ${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
104108
105109 prepare-resources :
106110 - command : shell.exec
@@ -352,6 +356,18 @@ functions:
352356 cd ${DRIVERS_TOOLS}/.evergreen
353357 DRIVERS_TOOLS=${DRIVERS_TOOLS} MONGODB_URI=${MONGODB_URI} bash ${DRIVERS_TOOLS}/.evergreen/run-load-balancer.sh stop
354358
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+
355371 run-tests :
356372 - command : shell.exec
357373 type : test
@@ -508,7 +524,7 @@ functions:
508524
509525 echo "Response Body: $response_body"
510526 echo "HTTP Status: $http_status"
511-
527+
512528 assume-ec2-role :
513529 - command : ec2.assume_role
514530 params :
@@ -1031,6 +1047,36 @@ post:
10311047 - func : cleanup
10321048
10331049tasks :
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+
10341080 - name : test-net472
10351081 commands :
10361082 - func : setup-csfle-secrets
@@ -2179,6 +2225,42 @@ task_groups:
21792225 - validate-apicompat
21802226
21812227buildvariants :
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+
2247+ - name : unit-tests-macos
2248+ display_name : Unit Tests on MacOs
2249+ run_on : macos-14
2250+ expansions :
2251+ OS : " macos-14"
2252+ tasks :
2253+ - name : unit-tests-netstandard21
2254+ - name : unit-tests-net60
2255+
2256+ - name : unit-tests-macos-arm
2257+ display_name : Unit Tests on MacOs Arm
2258+ run_on : macos-14-arm64
2259+ expansions :
2260+ OS : " macos-14-arm64"
2261+ tasks :
2262+ - name : unit-tests-net60
2263+
21822264- matrix_name : stable-api-tests
21832265 matrix_spec : { version: ["5.0", "6.0", "7.0", "8.0", "rapid", "latest"], topology: "standalone", auth: "auth", ssl: "nossl", os: "windows-64" }
21842266 display_name : " Stable API ${version} ${topology} ${auth} ${ssl} ${os}"
0 commit comments