doc(Appveyor): 增加代码覆盖率分析条件

#Comment
comment 仅GitHub Master分支进行代码覆盖率分析
This commit is contained in:
Argo Zhang 2019-05-28 15:25:30 +08:00
parent ede6d8316b
commit 3fadec447d
1 changed files with 9 additions and 4 deletions

View File

@ -36,9 +36,14 @@ if ("$($env:APPVEYOR_REPO_BRANCH)" -eq "master")
cd $($env:appveyor_build_folder)
echo "" "Install coveralls.net tools"
dotnet tool install coveralls.net --version 1.0.0 --tool-path "./tools"
if ("$($env:APPVEYOR_REPO_PROVIDER)" -eq "gitHub") {
echo "" "Install coveralls.net tools"
dotnet tool install coveralls.net --version 1.0.0 --tool-path "./tools"
dotnet test UnitTest --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Bootstrap*]*" /p:ExcludeByFile="../Bootstrap.Admin/Program.cs%2c../Bootstrap.Admin/Startup.cs%2c../Bootstrap.Admin/HttpHeaderOperation.cs" /p:CoverletOutput=../
cmd.exe /c ".\tools\csmacnz.Coveralls.exe --opencover -i coverage.opencover.xml --useRelativePaths"
dotnet test UnitTest --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[Bootstrap*]*" /p:ExcludeByFile="../Bootstrap.Admin/Program.cs%2c../Bootstrap.Admin/Startup.cs%2c../Bootstrap.Admin/HttpHeaderOperation.cs" /p:CoverletOutput=../
cmd.exe /c ".\tools\csmacnz.Coveralls.exe --opencover -i coverage.opencover.xml --useRelativePaths"
}
else {
dotnet test UnitTest --no-restore
}
}