Skip to content

Commit c7ae0f5

Browse files
committed
Streamline dotnet target versions
Add dotnet 8.0 as target version. This should make the tests run against dotnet 8 too, because right now those jobs seem to do nothing. Align the csproj files from `tests/Doc` and `tests/NRedisStack.Tests`, to use the same versions for dependencies, as much as possible. Take the opportunity to bring some dependencies to their latest versions. Update the GitHub actions that install dotnet to be @V3, and to install the non-preview version 8.
1 parent 579d1d8 commit c7ae0f5

File tree

5 files changed

+29
-24
lines changed

5 files changed

+29
-24
lines changed

.github/workflows/doctests.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v3
2828
- name: .NET Core 6
29-
uses: actions/setup-dotnet@v2
29+
uses: actions/setup-dotnet@v3
3030
with:
31-
dotnet-version: '6.0.x'
31+
dotnet-version: 6
3232
- name: .NET Core 7
33-
uses: actions/setup-dotnet@v2
33+
uses: actions/setup-dotnet@v3
3434
with:
35-
dotnet-version: '7.0.x'
35+
dotnet-version: 7
36+
- name: .NET Core 8
37+
uses: actions/setup-dotnet@v3
38+
with:
39+
dotnet-version: 8
3640
- name: run tests
3741
working-directory: tests/Doc
3842
run: |

.github/workflows/reusable.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,19 @@ jobs:
2929
- uses: actions/checkout@v3
3030

3131
- name: .NET Core 6
32-
uses: actions/setup-dotnet@v2
32+
uses: actions/setup-dotnet@v3
3333
with:
34-
dotnet-version: '6.0.x'
34+
dotnet-version: 6
3535

3636
- name: .NET Core 7
37-
uses: actions/setup-dotnet@v2
37+
uses: actions/setup-dotnet@v3
3838
with:
39-
dotnet-version: '7.0.x'
39+
dotnet-version: 7
4040

41-
- name: .NET Core 8 preview
41+
- name: .NET Core 8
4242
uses: actions/setup-dotnet@v3
4343
with:
4444
dotnet-version: 8
45-
dotnet-quality: 'preview'
4645

4746
- name: run redis-stack-server docker
4847
working-directory: .github

src/NRedisStack/NRedisStack.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Nullable>enable</Nullable>
5-
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<LangVersion>latest</LangVersion>
88
<ImplicitUsings>enable</ImplicitUsings>

tests/Doc/Doc.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<IsWindows>$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::get_Windows())))</IsWindows>
4-
<TargetFrameworks Condition=" '$(IsWindows)' == 'true'">net6.0;net7.0;net481</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(IsWindows)' != 'true'">net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks Condition=" '$(IsWindows)' == 'true'">net6.0;net7.0;net8.0;net481</TargetFrameworks>
5+
<TargetFrameworks Condition=" '$(IsWindows)' != 'true'">net6.0;net7.0;net8.0</TargetFrameworks>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<LangVersion>latest</LangVersion>
99
<IsPackable>false</IsPackable>
1010
<OutputType>Module</OutputType>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
14-
<PackageReference Include="xunit" Version="2.4.2" />
15-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
14+
<PackageReference Include="xunit" Version="2.6.6" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
<PrivateAssets>all</PrivateAssets>
1818
</PackageReference>
@@ -22,4 +22,4 @@
2222
<ProjectReference Include="..\..\src\NRedisStack\NRedisStack.csproj" />
2323
<ProjectReference Include="..\..\tests\NRedisStack.Tests\NRedisStack.Tests.csproj" />
2424
</ItemGroup>
25-
</Project>
25+
</Project>

tests/NRedisStack.Tests/NRedisStack.Tests.csproj

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<IsWindows>$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::get_Windows())))</IsWindows>
4-
<TargetFrameworks Condition=" '$(IsWindows)' == 'true'">net6.0;net7.0;net481</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(IsWindows)' != 'true'">net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks Condition=" '$(IsWindows)' == 'true'">net6.0;net7.0;net8.0;net481</TargetFrameworks>
5+
<TargetFrameworks Condition=" '$(IsWindows)' != 'true'">net6.0;net7.0;net8.0</TargetFrameworks>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<LangVersion>latest</LangVersion>
9-
109
<IsPackable>false</IsPackable>
1110
</PropertyGroup>
1211

@@ -20,12 +19,15 @@
2019
<PrivateAssets>all</PrivateAssets>
2120
</PackageReference>
2221
<PackageReference Include="dotenv.net" Version="3.1.2" />
23-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
22+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
2423
<PackageReference Include="NetTopologySuite" Version="2.5.0" />
25-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
24+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
25+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26+
<PrivateAssets>all</PrivateAssets>
27+
</PackageReference>
2628
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
27-
<PackageReference Include="xunit" Version="2.4.1" />
28-
<PackageReference Include="xunit.assert" Version="2.4.1" />
29+
<PackageReference Include="xunit" Version="2.6.6" />
30+
<PackageReference Include="xunit.assert" Version="2.6.6" />
2931
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.0" />
3032
</ItemGroup>
3133

0 commit comments

Comments
 (0)