Browse Source

cherry pick CI improvements from @JimBobSquarePants

pull/1087/head
Anton Firszov 6 years ago
parent
commit
3d5cd5c4c7
  1. 1
      GitVersion.yml
  2. 6
      ci-test.ps1
  3. 2
      src/Directory.Build.targets
  4. 3
      tests/Directory.Build.props
  5. 2
      tests/Directory.Build.targets
  6. 2
      tests/ImageSharp.Tests/ImageSharp.Tests.csproj

1
GitVersion.yml

@ -2,5 +2,6 @@ continuous-delivery-fallback-tag: ci
branches:
master:
tag: unstable
mode: ContinuousDeployment
pull-request:
tag: pr

6
ci-test.ps1

@ -34,8 +34,4 @@ elseif ($platform -eq '-x86' -and $targetFramework -match $netFxRegex) {
else {
dotnet test --no-build -c Release -f $targetFramework
}
# Explicitly exit with 0 to ignore errors caused by coverlet attempting to read
# project files that dotnet test is set to ignore.
exit 0
}

2
src/Directory.Build.targets

@ -50,6 +50,6 @@
<!-- Empty target so that `dotnet test` will work on the solution -->
<!-- https://github.com/Microsoft/vstest/issues/411 -->
<Target Name="VSTest" />
<Target Name="VSTest" Condition="'$(IsTestProject)' == 'true'"/>
</Project>

3
tests/Directory.Build.props

@ -28,6 +28,9 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" IsImplicitlyDefined="true" />
<PackageReference Include="xunit" IsImplicitlyDefined="true" />
<PackageReference Include="xunit.runner.visualstudio" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup Condition="'$(codecov)' == 'true' AND '$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.collector" IsImplicitlyDefined="true" />
<PackageReference Include="coverlet.msbuild" IsImplicitlyDefined="true" />
</ItemGroup>

2
tests/Directory.Build.targets

@ -25,7 +25,7 @@
<!--Code coverage specific settings-->
<!--https://github.com/tonerdo/coverlet-->
<PropertyGroup Condition="'$(codecov)' == 'true'">
<PropertyGroup Condition="'$(codecov)' == 'true' AND '$(IsTestProject)' == 'true'">
<CollectCoverage>true</CollectCoverage>
<UseSourceLink>true</UseSourceLink>
<CoverletOutputFormat>opencover</CoverletOutputFormat>

2
tests/ImageSharp.Tests/ImageSharp.Tests.csproj

@ -8,6 +8,8 @@
<AssemblyName>SixLabors.ImageSharp.Tests</AssemblyName>
<Platforms>AnyCPU;x64;x86</Platforms>
<RootNamespace>SixLabors.ImageSharp.Tests</RootNamespace>
<!--Used to show test project to dotnet test-->
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>

Loading…
Cancel
Save