Skip to content

Commit

Permalink
replace coverlet.collector with coverlet.msbuild, add tasks to genera…
Browse files Browse the repository at this point in the history
…te tasks from vscode
  • Loading branch information
ashotjanibekyan committed May 19, 2024
1 parent 238eb54 commit 2a1d9bd
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ _UpgradeReport_Files/
Thumbs.db
Desktop.ini
.DS_Store

coveragereport
coverage.cobertura.xml
33 changes: 32 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,37 @@
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-all-tests",
"command": "dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura",
"type": "shell",
"dependsOn": [
"build"
],
"problemMatcher": []
},
{
"label": "generate-report",
"command": "reportgenerator \"-reports:./src/CrossWikiEditor.Tests/coverage.cobertura.xml\" \"-targetdir:coveragereport\" -reporttypes:Html",
"type": "shell",
"dependsOn": [
"run-all-tests"
],
"problemMatcher": []
},
{
"label": "open-coverage-report",
"windows": {
"command": "explorer"
},
"args": [
".\\coveragereport\\index.html"
],
"dependsOn": [
"generate-report"
],
"problemMatcher": []
}
]
}
}
46 changes: 46 additions & 0 deletions CrossWikiEditor.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.34902.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CrossWikiEditor.Core", "src\CrossWikiEditor.Core\CrossWikiEditor.Core.csproj", "{3871940E-876E-D7E4-76C5-49E9FD40E2AB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CrossWikiEditor.Tests", "src\CrossWikiEditor.Tests\CrossWikiEditor.Tests.csproj", "{37678317-5671-2112-9299-0A5E5B67B96D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CrossWikiEditor", "src\CrossWikiEditor\CrossWikiEditor.csproj", "{F6982CB1-F9F9-CEF7-6894-83F2C097E4C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3871940E-876E-D7E4-76C5-49E9FD40E2AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3871940E-876E-D7E4-76C5-49E9FD40E2AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3871940E-876E-D7E4-76C5-49E9FD40E2AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3871940E-876E-D7E4-76C5-49E9FD40E2AB}.Release|Any CPU.Build.0 = Release|Any CPU
{37678317-5671-2112-9299-0A5E5B67B96D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{37678317-5671-2112-9299-0A5E5B67B96D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37678317-5671-2112-9299-0A5E5B67B96D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37678317-5671-2112-9299-0A5E5B67B96D}.Release|Any CPU.Build.0 = Release|Any CPU
{F6982CB1-F9F9-CEF7-6894-83F2C097E4C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6982CB1-F9F9-CEF7-6894-83F2C097E4C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6982CB1-F9F9-CEF7-6894-83F2C097E4C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6982CB1-F9F9-CEF7-6894-83F2C097E4C6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
ExtensibilityGlobals) = postSolution
SolutionGuid = {89D0875A-4F43-4FC2-8688-84B352CE824D}
EndGlobalSection
EndGlobal
NestedProjects) = preSolution
{D31A096C-5D40-4713-92ED-504DBF5BA1D3} = {BAE7516E-3382-4600-A215-63829B10688E}
{89048868-A8D9-4C49-A246-D988E49BFE63} = {BAE7516E-3382-4600-A215-63829B10688E}
{5B9E7549-EAC0-4A15-81FE-30819B153B29} = {BAE7516E-3382-4600-A215-63829B10688E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {89D0875A-4F43-4FC2-8688-84B352CE824D}
EndGlobalSection
EndGlobal
8 changes: 4 additions & 4 deletions src/CrossWikiEditor.Tests/CrossWikiEditor.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

<ItemGroup>
<PackageReference Include="Bogus" Version="35.5.1" />
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
Expand All @@ -21,10 +25,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NunitXml.TestLogger" Version="3.1.20" />
<PackageReference Include="RichardSzalay.MockHttp" Version="7.0.0" />
</ItemGroup>
Expand Down

0 comments on commit 2a1d9bd

Please sign in to comment.