From 490a71f8fed4c75eb9001ff6ff667dbb66ca0273 Mon Sep 17 00:00:00 2001 From: Eilon Lipton Date: Tue, 24 Sep 2019 11:51:00 -0700 Subject: [PATCH] Remove code coverage steps --- azure-pipelines.yml | 1 - azure-pipelines/build.yml | 1 - azure-pipelines/dotnet.yml | 12 +++------ azure-pipelines/publish-codecoverage.yml | 31 ------------------------ src/Directory.Build.targets | 3 --- 5 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 azure-pipelines/publish-codecoverage.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 87e4ed8..e40bcb5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,7 +14,6 @@ variables: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true BuildConfiguration: Release BuildPlatform: Any CPU - #codecov_token: # Get a new one from https://codecov.io/ #ci_feed: # find guid used by Azure DevOps Artifacts for the feed NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 25d0b91..17c4495 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -45,5 +45,4 @@ jobs: - template: install-dependencies.yml parameters: initArgs: -NoRestore - - template: publish-codecoverage.yml - template: publish-deployables.yml diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 64dfba8..65f18b2 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -12,7 +12,7 @@ steps: displayName: dotnet test -f net472 inputs: command: test - arguments: --no-build -c $(BuildConfiguration) -f net472 --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true + arguments: --no-build -c $(BuildConfiguration) -f net472 --filter "TestCategory!=FailsInCloudTest" -v n testRunTitle: net472-$(Agent.JobName) workingDirectory: src condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) @@ -21,7 +21,7 @@ steps: displayName: dotnet test -f netcoreapp2.1 inputs: command: test - arguments: --no-build -c $(BuildConfiguration) -f netcoreapp2.1 --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true + arguments: --no-build -c $(BuildConfiguration) -f netcoreapp2.1 --filter "TestCategory!=FailsInCloudTest" -v n testRunTitle: netcoreapp2.1-$(Agent.JobName) workingDirectory: src @@ -29,7 +29,7 @@ steps: displayName: dotnet test -f netcoreapp3.0 inputs: command: test - arguments: --no-build -c $(BuildConfiguration) -f netcoreapp2.2 --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true + arguments: --no-build -c $(BuildConfiguration) -f netcoreapp2.2 --filter "TestCategory!=FailsInCloudTest" -v n testRunTitle: netcoreapp3.0-$(Agent.JobName) workingDirectory: src @@ -55,9 +55,3 @@ steps: SymbolServerType: TeamServices displayName: Publish symbols to symbol server condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Agent.OS'], 'Windows_NT')) - -- bash: bash <(curl -s https://codecov.io/bash) - displayName: Publish code coverage results to codecov.io - condition: ne(variables['codecov_token'], '') - timeoutInMinutes: 3 - continueOnError: true diff --git a/azure-pipelines/publish-codecoverage.yml b/azure-pipelines/publish-codecoverage.yml deleted file mode 100644 index 6d367de..0000000 --- a/azure-pipelines/publish-codecoverage.yml +++ /dev/null @@ -1,31 +0,0 @@ -steps: -- download: current - artifact: coverageResults-Windows - displayName: Download Windows code coverage results - continueOnError: true -- download: current - artifact: coverageResults-Linux - displayName: Download Linux code coverage results - continueOnError: true -- download: current - artifact: coverageResults-macOS - displayName: Download macOS code coverage results - continueOnError: true -- powershell: | - dotnet tool install --tool-path obj dotnet-reportgenerator-globaltool --version 4.2.2 --configfile azure-pipelines/justnugetorg.nuget.config - Copy-Item -Recurse $(Pipeline.Workspace)/coverageResults-Windows/obj/* $(System.DefaultWorkingDirectory)/obj - Write-Host "Substituting {reporoot} with $(System.DefaultWorkingDirectory)" - $reports = Get-ChildItem -Recurse "$(Pipeline.Workspace)/coverage.cobertura.xml" - $reports |% { - $content = Get-Content -Path $_ |% { $_.Replace("{reporoot}", "$(System.DefaultWorkingDirectory)") } - Set-Content -Path $_ -Value $content -Encoding UTF8 - } - $Inputs = [string]::join(';', ($reports |% { Resolve-Path -relative $_ })) - obj/reportgenerator -reports:"$Inputs" -targetdir:coveragereport -reporttypes:Cobertura - displayName: Merge coverage -- task: PublishCodeCoverageResults@1 - displayName: Publish code coverage results to Azure DevOps - inputs: - codeCoverageTool: cobertura - summaryFileLocation: 'coveragereport/Cobertura.xml' - failIfCoverageEmpty: true diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 1ddcba6..ae277d5 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,8 +1,5 @@ - cobertura [xunit.*]* - - $(OutputPath)/