-
Notifications
You must be signed in to change notification settings - Fork 0
/
MarsRover.Core.UnitTests.csproj
28 lines (20 loc) · 1.18 KB
/
MarsRover.Core.UnitTests.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MarsRover.Core\MarsRover.Core.csproj" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(Configuration)' == 'Coverage' ">
<Exec Command="dotnet tool restore" />
<Exec Command="dotnet coverlet bin/Debug/net7/MarsRover.Core.UnitTests.dll --target "dotnet" --targetargs "test MarsRover.Core.UnitTests.csproj --no-build --verbosity quiet" --format cobertura --output reports/coverage/coverage.cobertura.xml" />
<Exec Command="dotnet reportgenerator "-reports:reports/coverage/coverage.cobertura.xml" "-targetdir:reports/html" "-historydir:reports/coverage/history"" />
</Target>
</Project>