remove codecov (#2353)
This commit is contained in:
Родитель
a9d3fd66c1
Коммит
a90eb8fa10
|
@ -1,73 +0,0 @@
|
|||
#Run code coverage tests to generate report
|
||||
.\nuget.exe install "OpenCover" -Version "4.6.519"
|
||||
|
||||
$assemblies = get-childitem "..\bin\Release" -Filter *Tests.dll -Exclude *netcoreapp11.Tests.dll -recurse | foreach-object { $_.FullName }
|
||||
|
||||
foreach ($assembly in $assemblies)
|
||||
{
|
||||
Write-Host "==========================================="
|
||||
Write-Host "Running tests for $assembly"
|
||||
Write-Host "==========================================="
|
||||
..\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe `
|
||||
-register:user `
|
||||
"-target:${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" `
|
||||
"-targetargs:$assembly /logger:trx" `
|
||||
"-filter:+[Microsoft.ApplicationInsights*]* +[Microsoft.AI*]* -[*Tests]* -[*TestFramework*]*" `
|
||||
-hideskipped:All `
|
||||
-output:.\coverage.xml `
|
||||
-mergeoutput
|
||||
}
|
||||
|
||||
$netcoreassemblies = get-childitem "..\bin\Release" -Filter *netcoreapp11.Tests.dll -recurse | foreach-object { $_.FullName }
|
||||
|
||||
foreach ($assembly in $netcoreassemblies)
|
||||
{
|
||||
Write-Host "==========================================="
|
||||
Write-Host "Running tests for $assembly"
|
||||
Write-Host "==========================================="
|
||||
# Net Core tests should be run by a different version of vstest.console.exe
|
||||
..\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe `
|
||||
-register:user `
|
||||
"-target:${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" `
|
||||
"-targetargs:$assembly /logger:trx /Framework:FrameworkCore10" `
|
||||
"-filter:+[Microsoft.ApplicationInsights*]* +[Microsoft.AI*]* -[*Tests]* -[*TestFramework*]*" `
|
||||
-hideskipped:All `
|
||||
-output:.\coverage.xml `
|
||||
-mergeoutput
|
||||
}
|
||||
|
||||
#Download report uploader
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://codecov.io/bash", ".\CodecovUploader.sh")
|
||||
|
||||
#On the Agent box repo is in a detached state. So get branchName by commit hash
|
||||
$lastCommit = $(git rev-parse HEAD)
|
||||
Write-Host "Last commit:" $lastCommit
|
||||
|
||||
$branchNames = $(git branch --all --contains $lastCommit)
|
||||
Write-Host "All branches that have this commit:" $branchNames
|
||||
|
||||
$i=0
|
||||
Foreach ($branchName in $branchNames)
|
||||
{
|
||||
$i++
|
||||
# First element in the array is trash because repo is detached
|
||||
if ($i -gt 1)
|
||||
{
|
||||
$branchName = $branchName.Trim()
|
||||
# Check for what branches current commit (for which we have coverage) is the last commit
|
||||
$lastCommitOnBranch = $(git rev-parse $branchName)
|
||||
if ($lastCommitOnBranch -eq $lastCommit)
|
||||
{
|
||||
#Cut the prefix that CodeCov does not handle well
|
||||
if ($branchName.StartsWith("remotes/origin/"))
|
||||
{
|
||||
$branchName = $branchName.Substring("remotes/origin/".Length)
|
||||
}
|
||||
Write-Host "We will upload report to:" $branchName
|
||||
|
||||
#Upload report
|
||||
.\CodecovUploader.sh -f coverage.xml -t $env:CODECOVACCESSKEY -X gcov -B $branchName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio
|
|||
ProjectSection(SolutionItems) = preProject
|
||||
.gitignore = .gitignore
|
||||
..\CHANGELOG.md = ..\CHANGELOG.md
|
||||
CodeCov.ps1 = CodeCov.ps1
|
||||
Directory.Build.props = Directory.Build.props
|
||||
NuGet.config = NuGet.config
|
||||
Package.targets = Package.targets
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[![Build Status](https://mseng.visualstudio.com/AppInsights/_apis/build/status/ChuckNorris/AI-BaseSDK-develop-linux?branchName=develop)](https://mseng.visualstudio.com/AppInsights/_build/latest?definitionId=6237?branchName=develop)
|
||||
[![Build Status](https://mseng.visualstudio.com/AppInsights/_apis/build/status/ChuckNorris/AI-BaseSDK-GitHub-Master?branchName=develop)](https://mseng.visualstudio.com/AppInsights/_build/latest?definitionId=1822?branchName=develop)
|
||||
[![codecov.io](https://codecov.io/github/Microsoft/ApplicationInsights-dotnet/coverage.svg?branch=develop)](https://codecov.io/github/Microsoft/ApplicationInsights-dotnet?branch=develop)
|
||||
|
||||
## NuGet packages
|
||||
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
Param([String]$binRoot='..\bin', [String]$configuration='Release')
|
||||
|
||||
#Run code coverage tests to generate report
|
||||
..\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user "-target:C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "-targetargs:$binRoot\$configuration\src\Adapters.Tests\Log4NetAppender.Net45.Tests\Microsoft.ApplicationInsights.Log4NetAppender.Net45.Tests.dll $binRoot\$configuration\src\Adapters.Tests\NLogTarget.Net45.Tests\Microsoft.ApplicationInsights.NLogTarget.Net45.Tests.dll $binRoot\$configuration\src\Adapters.Tests\TraceListener.Net45.Tests\Microsoft.ApplicationInsights.TraceListener.Net45.Tests.dll $binRoot\$configuration\src\NuGet.Tests\Xdt.Tests\Xdt.Tests.dll /logger:trx" "-filter:+[Microsoft.ApplicationInsights*]* -[*Tests]*" -hideskipped:All -output:.\coverage.xml
|
||||
|
||||
#Download report uploader
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://codecov.io/bash", ".\CodecovUploader.sh")
|
||||
|
||||
#On the Agent box repo is in a detached state. So get branchName by commit hash
|
||||
$lastCommit = $(git rev-parse HEAD)
|
||||
Write-Host "Last commit:" $lastCommit
|
||||
|
||||
$branchNames = $(git branch --all --contains $lastCommit)
|
||||
Write-Host "All branches that have this commit:" $branchNames
|
||||
|
||||
$i=0
|
||||
Foreach ($branchName in $branchNames)
|
||||
{
|
||||
$i++
|
||||
# First element in the array is trash because repo is detached
|
||||
if ($i -gt 1)
|
||||
{
|
||||
$branchName = $branchName.Trim()
|
||||
# Check for what branches current commit (for which we have coverage) is the last commit
|
||||
$lastCommitOnBranch = $(git rev-parse $branchName)
|
||||
if ($lastCommitOnBranch -eq $lastCommit)
|
||||
{
|
||||
#Cut the prefix that CodeCov does not handle well
|
||||
if ($branchName.StartsWith("remotes/origin/"))
|
||||
{
|
||||
$branchName = $branchName.Substring("remotes/origin/".Length)
|
||||
}
|
||||
Write-Host "We will upload report to:" $branchName
|
||||
|
||||
#Upload report
|
||||
.\CodecovUploader.sh -f coverage.xml -t $env:CODECOVACCESSKEY -X gcov -B $branchName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,7 +14,6 @@ EndProject
|
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solution Items", "{117E14CF-5656-42BD-B64E-93142160B6FA}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\CHANGELOG.md = ..\CHANGELOG.md
|
||||
CodeCov.ps1 = CodeCov.ps1
|
||||
Directory.Build.props = Directory.Build.props
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
![Build](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/96a62c4a-58c2-4dbb-94b6-5979ebc7f2af/2637/badge)
|
||||
[![codecov.io](https://codecov.io/github/Microsoft/ApplicationInsights-dotnet-logging/coverage.svg?branch=develop)](https://codecov.io/github/Microsoft/ApplicationInsights-dotnet-logging?branch=develop)
|
||||
|
||||
## Nuget packages
|
||||
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
#Run code coverage tests to generate report
|
||||
..\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user "-target:C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "-targetargs:..\a\Release\Src\DependencyCollector\Net40.Tests\Microsoft.ApplicationInsights.DependencyCollector.Net40.Tests.dll ..\a\Release\Src\DependencyCollector\Net45.Tests\Microsoft.ApplicationInsights.DependencyCollector.Net45.Tests.dll ..\a\Release\Src\DependencyCollector\Nuget.Tests\Microsoft.ApplicationInsights.DependencyCollector.NuGet.Tests.dll ..\a\Release\Src\PerformanceCollector\Unit.Tests\Unit.Tests.dll ..\a\Release\Src\PerformanceCollector\Xdt.Tests\Xdt.Tests.dll ..\a\Release\Src\Web\Web.Net40.Tests\Microsoft.ApplicationInsights.Web.Net40.Tests.dll ..\a\Release\Src\Web\Web.Net45.Tests\Microsoft.ApplicationInsights.Web.Net45.Tests.dll ..\a\Release\Src\Web\Web.Nuget.Tests\Microsoft.ApplicationInsights.Platform.Web.Nuget.Tests.dll ..\a\Release\Src\WindowsServer\WindowsServer.Net40.Tests\WindowsServer.Net40.Tests.dll ..\a\Release\Src\WindowsServer\WindowsServer.Net45.Tests\WindowsServer.Net45.Tests.dll ..\a\Release\Src\WindowsServer\WindowsServer.Nuget.Tests\WindowsServer.Nuget.Tests.dll /TestCaseFilter:TestCategory!=Required_4_5_1 /logger:trx" "-filter:+[Microsoft.AI*]* -[*Tests]* -[*TestFramework*]* -[*]Microsoft.ApplicationInsights.Extensibility.Implementation.External*" -hideskipped:All -output:.\coverage.xml
|
||||
|
||||
#Download report uploader
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://codecov.io/bash", ".\CodecovUploader.sh")
|
||||
|
||||
#On the Agent box repo is in a detached state. So get branchName by commit hash
|
||||
$lastCommit = $(git rev-parse HEAD)
|
||||
Write-Host "Last commit:" $lastCommit
|
||||
|
||||
$branchNames = $(git branch --all --contains $lastCommit)
|
||||
Write-Host "All branches that have this commit:" $branchNames
|
||||
|
||||
$i=0
|
||||
Foreach ($branchName in $branchNames)
|
||||
{
|
||||
$i++
|
||||
# First element in the array is trash because repo is detached
|
||||
if ($i -gt 1)
|
||||
{
|
||||
$branchName = $branchName.Trim()
|
||||
# Check for what branches current commit (for which we have coverage) is the last commit
|
||||
$lastCommitOnBranch = $(git rev-parse $branchName)
|
||||
if ($lastCommitOnBranch -eq $lastCommit)
|
||||
{
|
||||
#Cut the prefix that CodeCov does not handle well
|
||||
if ($branchName.StartsWith("remotes/origin/"))
|
||||
{
|
||||
$branchName = $branchName.Substring("remotes/origin/".Length)
|
||||
}
|
||||
Write-Host "We will upload report to:" $branchName
|
||||
|
||||
#Upload report
|
||||
.\CodecovUploader.sh -f coverage.xml -t $env:CODECOVACCESSKEY -X gcov -B $branchName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
![Build Status](https://mseng.visualstudio.com/DefaultCollection/_apis/public/build/definitions/96a62c4a-58c2-4dbb-94b6-5979ebc7f2af/2513/badge)
|
||||
[![codecov.io](https://codecov.io/github/Microsoft/ApplicationInsights-server-dotnet/coverage.svg?branch=develop)](https://codecov.io/github/Microsoft/ApplicationInsights-server-dotnet?branch=develop)
|
||||
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче