microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.47k stars 2.6k forks source link

Merge coverage reports from multiple runs #10353

Open pkuczynski opened 5 years ago

pkuczynski commented 5 years ago

Required Information

Type: bug Enter Task Name: PublishCodeCoverageResults@1

Environment

Issue Description

Task PublishCodeCoverageResults@1 supports reports from multiple files, but the summary just shows the first match.

Task logs

The behavior for a task configured with a wildcard path for the coverage file is a little inconsistent:

      - task: PublishCodeCoverageResults@1
        inputs:
          codeCoverageTool: cobertura
          summaryFileLocation: $(System.DefaultWorkingDirectory)/packages/*/build/coverage/coverage.cobertura.xml

In this example, there are few coverage.cobertura.xml files from separate test runs. Unfortunately, I receive warning:


##[warning]Multiple file or directory matches were found. Using the first match: ```

Ideally, the summary would show the coverage for each assembly separately. Because I'm working in a monorepo and would like to trace multiple folders separately.

A similar issue has been reported in https://github.com/MicrosoftDocs/vsts-docs/issues/4135
felipepessoto commented 7 months ago

It only merge files before publishing? If I have multiple jobs it means it won't work? For example, PublishTestResults works fine with multiple jobs if you set mergeTestResults=true

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

nulltoken commented 1 month ago

Is it really that stale ?