From 3fadec447d6f30b1f054cee584c149456aae22f2 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 28 May 2019 15:25:30 +0800 Subject: [PATCH] =?UTF-8?q?doc(Appveyor):=20=E5=A2=9E=E5=8A=A0=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=A6=86=E7=9B=96=E7=8E=87=E5=88=86=E6=9E=90=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Comment comment 仅GitHub Master分支进行代码覆盖率分析 --- appveyor.test.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/appveyor.test.ps1 b/appveyor.test.ps1 index 68a7c4fa..1650aea5 100644 --- a/appveyor.test.ps1 +++ b/appveyor.test.ps1 @@ -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 + } } \ No newline at end of file