Skip code coverage tasks for docs-only PRs#12879
Merged
JanProvaznik merged 2 commits intomainfrom Dec 5, 2025
Merged
Conversation
Contributor
|
Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
Co-authored-by: JanProvaznik <[email protected]>
Copilot
AI
changed the title
[WIP] Fix code coverage CI check failures in docs only PRs
Skip code coverage tasks for docs-only PRs
Dec 5, 2025
JanProvaznik
approved these changes
Dec 5, 2025
YuliiaKovalova
approved these changes
Dec 5, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a CI pipeline issue where docs-only PRs fail the Code Coverage job. The job was attempting to download and publish coverage artifacts that don't exist when tests are skipped for documentation-only changes.
Key Changes:
- Modified the
CodeCoveragejob to respect theonlyDocChangedflag that indicates whether only documentation files were modified - Added conditional execution to artifact downloads, coverage processing, and publishing tasks to skip them when
onlyDocChanged = 1 - Preserved existing misspellings (
Documention,Varibale) in job/variable names for consistency with the rest of the pipeline
This was referenced Dec 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Docs-only PRs fail the Code Coverage CI job because tests are skipped (no coverage artifacts generated), but the job unconditionally attempts to download and publish those artifacts.
Changes Made
Modified
.vsts-dotnet-ci.ymlCodeCoverage job to respect theonlyDocChangedflag:IfOnlyDocumentionChangedjob to access the flagonlyDocChangedvariable to job variableseq(variables.onlyDocChanged, 0)eq(variables.onlyDocChanged, 0)This aligns with how other jobs (BootstrapMSBuildOnFullFrameworkWindows, CoreBootstrappedOnLinux, etc.) already handle docs-only PRs.
Testing
Pipeline configuration change - will be validated on next PR run. When
onlyDocChanged = 1, all coverage tasks skip; whenonlyDocChanged = 0, coverage runs normally.Notes
Pre-existing typos in job/variable names (
Documention,Varibale) intentionally preserved for consistency across the pipeline.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.