Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c0c2c9f057
|
|||
|
fc1f5ca7d7
|
@@ -10,20 +10,20 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: https://github.com/actions/setup-dotnet@v4
|
uses: https://github.com/actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 9.x
|
dotnet-version: 10.x
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore --nologo
|
run: dotnet restore --nologo
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: dotnet test --nologo --no-restore --configuration Release
|
|
||||||
|
|
||||||
- name: Create the package
|
- name: Create the package
|
||||||
env:
|
env:
|
||||||
RELEASE_VERSION: ${{ gitea.ref_name }}
|
RELEASE_VERSION: ${{ gitea.ref_name }}
|
||||||
|
|||||||
@@ -21,34 +21,48 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: .NET tests
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
|
TEST_PROJECT: ./tests/Cqrs.Tests/Cqrs.Tests.csproj
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: https://github.com/actions/setup-dotnet@v4
|
uses: https://github.com/actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: '9.x'
|
dotnet-version: |
|
||||||
|
8.0.x
|
||||||
|
9.0.x
|
||||||
|
10.0.x
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore --nologo
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Build
|
- name: Build .NET 10.0
|
||||||
run: dotnet build --nologo --configuration Release --no-restore
|
run: dotnet build --no-restore --framework net10.0 --configuration Release ${{ env.TEST_PROJECT }}
|
||||||
|
|
||||||
- name: Test
|
- name: Build .NET 9.0
|
||||||
run: dotnet test --nologo --configuration Release --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage"
|
run: dotnet build --no-restore --framework net9.0 --configuration Release ${{ env.TEST_PROJECT }}
|
||||||
|
|
||||||
- name: Restore local tools
|
- name: Build .NET 8.0
|
||||||
run: dotnet tool restore
|
run: dotnet build --no-restore --framework net8.0 --configuration Release ${{ env.TEST_PROJECT }}
|
||||||
|
|
||||||
- name: Generate coverage report
|
- name: Test .NET 10.0
|
||||||
run: dotnet reportgenerator -reports:**/coverage.cobertura.xml -targetdir:./coverage -reporttypes:MarkdownSummary
|
run: dotnet run --no-build --framework net10.0 --configuration Release --project ${{ env.TEST_PROJECT }} -- -trx TestResults/results-net10.trx
|
||||||
|
|
||||||
|
- name: Test .NET 9.0
|
||||||
|
run: dotnet run --no-build --framework net9.0 --configuration Release --project ${{ env.TEST_PROJECT }} -- -trx TestResults/results-net9.trx
|
||||||
|
|
||||||
|
- name: Test .NET 8.0
|
||||||
|
run: dotnet run --no-build --framework net8.0 --configuration Release --project ${{ env.TEST_PROJECT }} -- -trx TestResults/results-net8.trx
|
||||||
|
|
||||||
- name: Upload dotnet test results
|
- name: Upload dotnet test results
|
||||||
#uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
uses: christopherhx/gitea-upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: coverage-results
|
name: test-results
|
||||||
path: coverage
|
path: TestResults
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
retention-days: 30
|
||||||
|
|||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dotnet.defaultSolution": "Just.Cqrs.sln",
|
"dotnet.defaultSolution": "Just.Cqrs.sln",
|
||||||
"dotnetAcquisitionExtension.enableTelemetry": false
|
"dotnetAcquisitionExtension.enableTelemetry": false,
|
||||||
|
"dotnet.testWindow.useTestingPlatformProtocol": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.1;net8.0;net9.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1;net8.0;net9.0;net10.0</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -13,8 +13,12 @@
|
|||||||
<ProjectReference Include="../Just.Cqrs.Abstractions/Just.Cqrs.Abstractions.csproj" />
|
<ProjectReference Include="../Just.Cqrs.Abstractions/Just.Cqrs.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$(TargetFramework) == 'net9.0' Or $(TargetFramework) == 'netstandard2.1'">
|
<ItemGroup Condition="$(TargetFramework) == 'net10.0' Or $(TargetFramework) == 'netstandard2.1'">
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="$(TargetFramework) == 'net9.0'">
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$(TargetFramework) == 'net8.0'">
|
<ItemGroup Condition="$(TargetFramework) == 'net8.0'">
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.2" />
|
<PackageReference Include="xunit.v3" Version="3.2.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||||
<PackageReference Include="xunit" Version="2.9.2" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Shouldly" Version="4.3.0" />
|
<PackageReference Include="Shouldly" Version="4.3.0" />
|
||||||
<PackageReference Include="NSubstitute" Version="5.3.0" />
|
<PackageReference Include="NSubstitute" Version="5.3.0" />
|
||||||
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
|
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
|
||||||
@@ -20,8 +23,12 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$(TargetFramework) == 'net9.0' Or $(TargetFramework) == 'netstandard2.1'">
|
<ItemGroup Condition="$(TargetFramework) == 'net10.0' Or $(TargetFramework) == 'netstandard2.1'">
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="$(TargetFramework) == 'net9.0'">
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$(TargetFramework) == 'net8.0'">
|
<ItemGroup Condition="$(TargetFramework) == 'net8.0'">
|
||||||
|
|||||||
Reference in New Issue
Block a user