[ci] Fix summary in test examples workflow#3951
Merged
andrey-churkin merged 6 commits intoFeb 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Actions “test examples” summary generation to work with actions/download-artifact v7 behavior changes by switching from globbed XML paths to directory-based recursive discovery in the summary script.
Changes:
- Update
.github/workflows/examples.ymlto passtest-resultsdirectory to the summary script instead of a glob pattern. - Update
.github/scripts/pytest_md_summary.pyto recursively discover XML reports usingpathlib.Path.rglob().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/examples.yml | Switches summary step invocation from globbed XML paths to passing the test-results directory. |
| .github/scripts/pytest_md_summary.py | Replaces glob-based discovery with recursive XML discovery via Path.rglob() and updates usage text. |
Comments suppressed due to low confidence (1)
.github/scripts/pytest_md_summary.py:47
ET.parse()can raisexml.etree.ElementTree.ParseError(e.g., if a file isn’t a JUnit report or is truncated).parse_xml_reportcurrently only handlesFileNotFoundError, so a single bad XML can cause the whole script to hit the top-levelexceptand potentially still exit successfully. Consider catchingET.ParseError(and possibly other I/O errors) per file and either skip that report with a clear message or fail with a non-zero exit code.
def parse_xml_report(xml_file: Path) -> list[TestInfo]:
"""
Parse the XML report generated by pytest.
:param xml_file: Path to the XML report file
:return: List of test info
"""
try:
tree = ET.parse(xml_file)
except FileNotFoundError:
return []
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Changes
Modify
.github/scripts/pytest_md_summary.pyto recursive search xml file in target directory instead of globReason for changes
https://github.com/openvinotoolkit/nncf/actions/runs/22205757297
Changed behavior of
actions/download-artifactsince v7.0.0Tests
https://github.com/openvinotoolkit/nncf/actions/runs/22402028564/job/64853123212?pr=3951