Content-Length: 333740 | pFad | http://github.com/dotnet/winforms/issues/13481

FFC Update build.yml and build-PR.yml to use default value to failIfCoverageEmpty for task PublishCodeCoverageResults@2 by LeafShi1 · Pull Request #13481 · dotnet/winforms · GitHub
Skip to content

Update build.yml and build-PR.yml to use default value to failIfCoverageEmpty for task PublishCodeCoverageResults@2 #13481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented May 20, 2025

Fixes #13535

Proposed changes

image
Microsoft Reviewers: Open in CodeFlow

…ageEmpty for task PublishCodeCoverageResults@2
Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.59683%. Comparing base (4c32f29) to head (49c57a1).
Report is 13 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##                main      #13481   +/-   ##
=============================================
  Coverage   76.59683%   76.59683%           
=============================================
  Files           3230        3230           
  Lines         639157      639157           
  Branches       47295       47295           
=============================================
  Hits          489574      489574           
+ Misses        146007      146006    -1     
- Partials        3576        3577    +1     
Flag Coverage Δ
Debug 76.59683% <ø> (ø)
integration 18.78274% <ø> (-0.00734%) ⬇️
production 51.00105% <ø> (ø)
test 97.40411% <ø> (ø)
unit 48.40823% <ø> (+0.00977%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the explicit failIfCoverageEmpty: true setting from the PublishCodeCoverageResults@2 tasks, allowing the pipeline to use the default behavior and avoid failures when coverage data is missing.

  • Removed failIfCoverageEmpty flag from build.yml and build-PR.yml
  • Prevents pipeline errors when no coverage report is generated

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
eng/pipelines/build.yml Removed explicit failIfCoverageEmpty: true input
eng/pipelines/build-PR.yml Removed explicit failIfCoverageEmpty: true input

@LeafShi1 LeafShi1 added the waiting-review This item is waiting on review by one or more members of team label May 29, 2025
@Shyam-Gupta
Copy link
Member

@LeafShi1 Would you know why it fails only in Windows_x64 Debug config and not in others?

@LeafShi1
Copy link
Member Author

LeafShi1 commented Jun 9, 2025

@LeafShi1 Would you know why it fails only in Windows_x64 Debug config and not in others?

Because the filter condition of this task is match Debug|X64

condition: and(eq(variables['_BuildConfig'], 'Debug'), eq('${{ parameters.targetArchitecture }}', 'x64'))

This was the judgment when the file was first added, but the code coverage result was never published successfully in the internal pipeline, you can refer to the result of the release/8.0.
But the reason why this part of the script is still retained is that it works in the public pipeline. We can see that the Code Coverage here is uploaded successfully.

Later, due to issue #12634, we changed PublishCodeCoverageResults@1 to PublishCodeCoverageResults@2, but mistakenly added failIfCoverageEmpty: true, which caused the pipeline to fail when no test results were detected. So now correct this error.

@LeafShi1 LeafShi1 requested a review from Shyam-Gupta June 10, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure waiting-review This item is waiting on review by one or more members of team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update failIfCoverageEmpty to use default value to prevent the pipeline from failing
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/dotnet/winforms/issues/13481

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy