Skip to content

Commit

Permalink
Clean up the unit test project files
Browse files Browse the repository at this point in the history
  • Loading branch information
loic-sharma committed Feb 16, 2020
1 parent 9c5d281 commit 53ba0a5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 59 deletions.
6 changes: 3 additions & 3 deletions .azure/pipelines/ci-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
inputs:
command: test
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(BuildConfiguration) --settings $(System.DefaultWorkingDirectory)/CodeCoverage.runsettings --collect:"XPlat Code Coverage" -- RunConfiguration.DisableAppDomain=true'
arguments: '--configuration $(BuildConfiguration) --collect:"XPlat Code Coverage"'

- task: DotNetCoreCLI@2
inputs:
Expand All @@ -74,14 +74,14 @@ jobs:
arguments: install --tool-path . dotnet-reportgenerator-globaltool
displayName: Install ReportGenerator tool

- script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"HtmlInline_AzurePipelines_Dark;Cobertura;Badges"
- script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"HtmlInline_AzurePipelines;Cobertura;Badges"
displayName: Create reports

- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml
summaryFileLocation: $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml

- script: dotnet pack --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)
displayName: Pack
Expand Down
16 changes: 0 additions & 16 deletions CodeCoverage.runsettings

This file was deleted.

14 changes: 0 additions & 14 deletions tests/BaGet.Core.Tests/BaGet.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Moq" Version="$(MoqPackageVersion)" />
<PackageReference Include="xunit" Version="$(XUnitPackageVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\BaGet.Core\BaGet.Core.csproj" />
</ItemGroup>
Expand Down
14 changes: 0 additions & 14 deletions tests/BaGet.Protocol.Tests/BaGet.Protocol.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Moq" Version="$(MoqPackageVersion)" />
<PackageReference Include="xunit" Version="$(XUnitPackageVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\BaGet.Protocol\BaGet.Protocol.csproj" />
</ItemGroup>
Expand Down
10 changes: 0 additions & 10 deletions tests/BaGet.Tests/BaGet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
<PackageReference Include="NuGet.Protocol" Version="$(NuGetPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(MicrosoftAspNetCorePackageVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="$(XUnitPackageVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 14 additions & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,23 @@

<!-- NuGet dependencies shared across projects -->
<PropertyGroup>
<MicrosoftAspNetCorePackageVersion>3.0.2</MicrosoftAspNetCorePackageVersion>
<MoqPackageVersion>4.10.0</MoqPackageVersion>
<MicrosoftAspNetCorePackageVersion>3.1.1</MicrosoftAspNetCorePackageVersion>
<NewtonsoftJsonPackageVersion>12.0.2</NewtonsoftJsonPackageVersion>
<NuGetPackageVersion>5.4.0</NuGetPackageVersion>
<XUnitPackageVersion>2.4.1</XUnitPackageVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="xunit" Version="$(XUnitPackageVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

0 comments on commit 53ba0a5

Please sign in to comment.