From 83010f666d583b1316281c6845e1bb796e3010e4 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 19 May 2021 14:54:03 -0700 Subject: [PATCH] Fix coverage paths reported in AZP. (#74759) --- .azure-pipelines/templates/coverage.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.azure-pipelines/templates/coverage.yml b/.azure-pipelines/templates/coverage.yml index 1864e444105..4d381c6d639 100644 --- a/.azure-pipelines/templates/coverage.yml +++ b/.azure-pipelines/templates/coverage.yml @@ -31,6 +31,9 @@ jobs: # Set the "pipelinesCoverage" variable to determine which type is uploaded. # Use "coverage" for Python and "coverage-powershell" for PowerShell. summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml" + # Override the root (sources) path specified in the coverage XML files. + # This allows coverage to be reported in Azure Pipelines even if the report was generated in a container. + pathToSources: "$(Agent.BuildDirectory)/$(checkoutPath)" displayName: Publish to Azure Pipelines condition: gt(variables.coverageFileCount, 0) - bash: .azure-pipelines/scripts/publish-codecov.sh "$(outputPath)"