Skip to content

[enhancement]: Do not mark PublishCodeCoverageResults as Failed when no coverage files provided #19111

Open

Description

Task name

PublishCodeCoverageResults@2

Describe your feature request here

In typical Build pipeline implementation steps are executed in Build -> UnitTest -> Publish order. Usually Publish tasks are marked with condition: succeededOrFailed() to allow publishing results when some unit tests have failed.

However in scenario when Build task fails, it transitively makes PublishCodeCoverageResults to fail as well with ##[error]No code coverage results were found to publish. error as it expects at least one coverage file. While it is not a big deal, but in a Pull Request pages instead of Build or Unit Tests errors there'll be PublishCodeCoverageResults fail reason displayed which can be a bit confusing.

So I'd like to know if it possible to update the task to work in the same manner as PublishTestResults task: emit a warning and do not get the task marked as failed.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions