Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"

env:
CI: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: true
Expand All @@ -16,14 +17,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET 9 SDK
- name: Setup .NET 10 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.x"
dotnet-version: "10.x"

- name: Test
run: dotnet test --collect:"XPlat Code Coverage"
- name: Install dotnet-coverage
run: dotnet tool install -g dotnet-coverage

- name: Test with coverage
run: dotnet-coverage collect --output coverage.cobertura.xml --output-format cobertura "dotnet test"

- name: Update codecov
if: startsWith(github.repository, 'khellang/')
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
files: coverage.cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
2 changes: 1 addition & 1 deletion NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<configuration>
<packageSources>
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet8" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet10" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet10/nuget/v3/index.json" />
</packageSources>
</configuration>
9 changes: 9 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestFeature"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
9 changes: 6 additions & 3 deletions src/Scrutor/Scrutor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Description>Register services using assembly scanning and a fluent API.</Description>
<VersionPrefix>6.1.0</VersionPrefix>
<Authors>Kristian Hellang</Authors>
<TargetFrameworks>net462;netstandard2.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net8.0;net10.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
Expand All @@ -25,6 +25,9 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- Only increase this value in case of incompatible API changes. -->
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<!-- Deterministic builds -->
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
Expand All @@ -35,7 +38,7 @@
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="10.0.0" />
</ItemGroup>
</Project>
13 changes: 7 additions & 6 deletions test/Scrutor.Tests/Scrutor.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<OutputType>Exe</OutputType>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Scrutor\Scrutor.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="coverlet.collector" Version="6.0.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Testing.Platform" Version="2.0.2" />
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.0" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
</ItemGroup>
</Project>