Skip to content

Commit 346e9a3

Browse files
Use same settings as ImageSharp
1 parent ae732a3 commit 346e9a3

3 files changed

Lines changed: 3 additions & 16 deletions

File tree

ci-test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if ($codecov -eq 'true') {
1717

1818
# Allow toggling of profile to workaround any potential JIT errors caused by code injection.
1919
dotnet clean -c $codecovProfile
20-
dotnet test -c $codecovProfile -f $targetFramework /p:codecov=true
20+
dotnet test --collect "XPlat Code Coverage" --settings .\tests\coverlet.runsettings -c $codecovProfile -f $targetFramework /p:CodeCov=true
2121
}
2222
elseif ($platform -eq '-x86' -and $targetFramework -match $netFxRegex) {
2323

tests/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
2929

30-
<ItemGroup>
30+
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
3131
<PackageReference Include="Microsoft.NET.Test.Sdk" IsImplicitlyDefined="true" />
3232
<PackageReference Include="xunit" IsImplicitlyDefined="true" />
3333
<PackageReference Include="xunit.runner.visualstudio" IsImplicitlyDefined="true" />

tests/Directory.Build.targets

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,12 @@
1717
<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" />
1818

1919
<!-- Tool versions for tool references across all projects -->
20-
<ItemGroup>
20+
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
2121
<!--dotnet tools does not have an x86 runner. You have to use separate SDKs-->
2222
<!--https://github.com/actions/setup-dotnet/issues/72-->
2323
<DotNetCliToolReference Update="dotnet-xunit" Version="2.3.1" />
2424
</ItemGroup>
2525

26-
<!--Code coverage specific settings-->
27-
<!--https://github.com/tonerdo/coverlet-->
28-
<PropertyGroup Condition="'$(codecov)' == 'true' AND '$(IsTestProject)' == 'true'">
29-
<CollectCoverage>true</CollectCoverage>
30-
<UseSourceLink>true</UseSourceLink>
31-
<CoverletOutputFormat>opencover</CoverletOutputFormat>
32-
<!--Output injects target framework into name despite explicit config. See build yml-->
33-
<CoverletOutput>$(MSBuildThisFileDirectory)..\coverage.xml</CoverletOutput>
34-
<!--Used by coverlet dues to reference issues with SixLabors.Core-->
35-
<!--https://github.com/tonerdo/coverlet/blob/master/Documentation/KnowIssues.md#4-failed-to-resolve-assembly-during-instrumentation-->
36-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
37-
</PropertyGroup>
38-
3926
<ItemGroup>
4027
<!--Test Dependencies-->
4128
<PackageReference Update="BenchmarkDotNet" Version="0.12.0" />

0 commit comments

Comments
 (0)