added dotnet 10 support
All checks were successful
.NET Test / .NET tests (push) Successful in 2m9s
.NET Publish / .NET tests (push) Successful in 1m0s

This commit is contained in:
2025-11-11 22:32:04 +04:00
parent 9485ad3ec4
commit 0f45b6b463
4 changed files with 43 additions and 23 deletions

View File

@@ -9,14 +9,18 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
name: .NET tests
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Setup .NET
uses: https://github.com/actions/setup-dotnet@v3
uses: https://github.com/actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: 10.x
- name: Restore dependencies
run: dotnet restore Railway/Railway.csproj

View File

@@ -14,28 +14,47 @@ on:
jobs:
test:
runs-on: ubuntu-latest
name: .NET tests
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Setup .NET
uses: https://github.com/actions/setup-dotnet@v3
uses: https://github.com/actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Build .NET 10.0
run: dotnet build --no-restore --framework net10.0 --configuration Release ./Raliway.Tests/Raliway.Tests.csproj
- name: Test
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults-9.x"
- name: Build .NET 9.0
run: dotnet build --no-restore --framework net9.0 --configuration Release ./Raliway.Tests/Raliway.Tests.csproj
- name: Build .NET 8.0
run: dotnet build --no-restore --framework net8.0 --configuration Release ./Raliway.Tests/Raliway.Tests.csproj
- name: Test .NET 10.0
run: dotnet run --no-build --framework net10.0 --configuration Release --project ./Raliway.Tests/Raliway.Tests.csproj -- -trx TestResults/results-net10.trx
- name: Test .NET 9.0
run: dotnet run --no-build --framework net9.0 --configuration Release --project ./Raliway.Tests/Raliway.Tests.csproj -- -trx TestResults/results-net9.trx
- name: Test .NET 8.0
run: dotnet run --no-build --framework net8.0 --configuration Release --project ./Raliway.Tests/Raliway.Tests.csproj -- -trx TestResults/results-net8.trx
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-results-9.x
path: TestResults-9.x
name: test-results
path: TestResults
if: ${{ always() }}
retention-days: 30

View File

@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>Just.Railway</AssemblyName>

View File

@@ -1,22 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<AssemblyName>Just.Railway.Tests</AssemblyName>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>