Skip to content

Commit b405b88

Browse files
authored
CSHARP-4991: Add .NET 8 to Smoke Tests (#1280)
1 parent b77f339 commit b405b88

File tree

6 files changed

+25
-3
lines changed

6 files changed

+25
-3
lines changed

build.cake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ Task("SmokeTestsNetCoreApp21").IsDependentOn("SmokeTests");
439439
Task("SmokeTestsNetCoreApp31").IsDependentOn("SmokeTests");
440440
Task("SmokeTestsNet50").IsDependentOn("SmokeTests");
441441
Task("SmokeTestsNet60").IsDependentOn("SmokeTests");
442+
Task("SmokeTestsNet80").IsDependentOn("SmokeTests");
442443

443444
Task("TestsPackaging")
444445
.IsDependentOn("TestsPackagingProjectReference")
@@ -658,6 +659,7 @@ Setup<BuildConfig>(
658659
string s when s.EndsWith("net472") => "net472",
659660
string s when s.EndsWith("net50") => "net5.0",
660661
string s when s.EndsWith("net60") => "net6.0",
662+
string s when s.EndsWith("net80") => "net8.0",
661663
_ => null
662664
};
663665

build.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ if($FoundDotNetCliVersion -ne $DotNetVersion) {
102102
& bash $ScriptPath --install-dir "$InstallPath" --channel 2.1 --no-path
103103
& bash $ScriptPath --install-dir "$InstallPath" --channel 3.1 --no-path
104104
& bash $ScriptPath --install-dir "$InstallPath" --channel 5.0 --no-path
105+
& bash $ScriptPath --install-dir "$InstallPath" --channel 8.0 --no-path
105106
& bash $ScriptPath --version "$DotNetVersion" --install-dir "$InstallPath" --channel "$DotNetChannel" --no-path
106107

107108
Remove-PathVariable "$InstallPath"
@@ -113,6 +114,7 @@ if($FoundDotNetCliVersion -ne $DotNetVersion) {
113114
& $ScriptPath -Channel 2.1 -InstallDir $InstallPath;
114115
& $ScriptPath -Channel 3.1 -InstallDir $InstallPath;
115116
& $ScriptPath -Channel 5.0 -InstallDir $InstallPath;
117+
& $ScriptPath -Channel 8.0 -InstallDir $InstallPath;
116118
& $ScriptPath -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath;
117119

118120
Remove-PathVariable "$InstallPath"

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ if [ "$DOTNET_VERSION" != "$DOTNET_INSTALLED_VERSION" ]; then
4747
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 2.1 --architecture x64 --install-dir .dotnet --no-path
4848
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 3.1 --architecture x64 --install-dir .dotnet --no-path
4949
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 5.0 --architecture x64 --install-dir .dotnet --no-path
50+
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 8.0 --architecture x64 --install-dir .dotnet --no-path
5051
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version $DOTNET_VERSION --install-dir .dotnet --no-path
5152
export PATH="$SCRIPT_DIR/.dotnet":$PATH
5253
export DOTNET_ROOT="$SCRIPT_DIR/.dotnet"

evergreen/evergreen.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,6 +1440,13 @@ tasks:
14401440
vars:
14411441
FRAMEWORK: net60
14421442

1443+
- name: test-smoke-tests-net80
1444+
commands:
1445+
- func: bootstrap-mongo-orchestration
1446+
- func: run-smoke-tests
1447+
vars:
1448+
FRAMEWORK: net80
1449+
14431450
- name: performance-tests-net60-server-v6.0
14441451
commands:
14451452
- func: bootstrap-mongo-orchestration
@@ -2343,6 +2350,7 @@ buildvariants:
23432350
- name: test-smoke-tests-netcoreapp31
23442351
- name: test-smoke-tests-net50
23452352
- name: test-smoke-tests-net60
2353+
- name: test-smoke-tests-net80
23462354

23472355
- matrix_name: "smoke-tests-linux"
23482356
matrix_spec: { os: "ubuntu-2004", ssl: "nossl", version: ["5.0", "6.0", "7.0", "latest"], topology: ["replicaset"] }
@@ -2353,6 +2361,7 @@ buildvariants:
23532361
- name: test-smoke-tests-netcoreapp31
23542362
- name: test-smoke-tests-net50
23552363
- name: test-smoke-tests-net60
2364+
- name: test-smoke-tests-net80
23562365

23572366
- matrix_name: "smoke-tests-macOS"
23582367
matrix_spec: { os: "macos-1100", ssl: "nossl", version: ["5.0", "6.0", "7.0", "latest"], topology: ["replicaset"] }
@@ -2363,6 +2372,7 @@ buildvariants:
23632372
- name: test-smoke-tests-netcoreapp31
23642373
- name: test-smoke-tests-net50
23652374
- name: test-smoke-tests-net60
2375+
- name: test-smoke-tests-net80
23662376

23672377
# Package release variants
23682378
- matrix_name: build-packages

evergreen/install-dotnet.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ if [[ $OS =~ [Ww]indows.* ]]; then
88
echo "Downloading Windows .NET SDK installer into $DOTNET_SDK_PATH folder..."
99
curl -Lfo "$DOTNET_SDK_PATH"/dotnet-install.ps1 https://dot.net/v1/dotnet-install.ps1
1010
echo "Installing .NET LTS SDK..."
11-
powershell.exe "$DOTNET_SDK_PATH"/dotnet-install.ps1 -Channel 6.0 -InstallDir "$DOTNET_SDK_PATH" -NoPath
11+
powershell.exe "$DOTNET_SDK_PATH"/dotnet-install.ps1 -Channel 8.0 -InstallDir "$DOTNET_SDK_PATH" -NoPath
1212
else
1313
echo "Downloading .NET SDK installer into $DOTNET_SDK_PATH folder..."
1414
curl -Lfo "$DOTNET_SDK_PATH"/dotnet-install.sh https://dot.net/v1/dotnet-install.sh
1515
echo "Installing .NET LTS SDK..."
16-
bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 6.0 --install-dir "$DOTNET_SDK_PATH" --no-path
16+
bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 8.0 --install-dir "$DOTNET_SDK_PATH" --no-path
1717
fi

tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/MongoDB.Driver.SmokeTests.Sdk.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net472;net5.0;net6.0</TargetFrameworks>
3+
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net472;net5.0;net6.0;net8.0</TargetFrameworks>
44
<LangVersion>9</LangVersion>
55
<CodeAnalysisRuleSet>..\..\..\MongoDBTest.ruleset</CodeAnalysisRuleSet>
66
</PropertyGroup>
@@ -54,6 +54,13 @@
5454
<PackageReference Include="Microsoft.Extensions.Logging.TraceSource" Version="6.0.0" />
5555
</ItemGroup>
5656

57+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
58+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
59+
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
60+
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
61+
<PackageReference Include="Microsoft.Extensions.Logging.TraceSource" Version="8.0.0" />
62+
</ItemGroup>
63+
5764
<ItemGroup>
5865
<None Update="xunit.runner.json">
5966
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

0 commit comments

Comments
 (0)