Skip to content

[ci] Fix summary in test examples workflow#3951

Merged
andrey-churkin merged 6 commits into
openvinotoolkit:developfrom
AlexanderDokuchaev:ad/fix_summary
Feb 26, 2026
Merged

[ci] Fix summary in test examples workflow#3951
andrey-churkin merged 6 commits into
openvinotoolkit:developfrom
AlexanderDokuchaev:ad/fix_summary

Conversation

@AlexanderDokuchaev

@AlexanderDokuchaev AlexanderDokuchaev commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

Changes

Modify .github/scripts/pytest_md_summary.py to recursive search xml file in target directory instead of glob

Reason for changes

https://github.com/openvinotoolkit/nncf/actions/runs/22205757297

Changed behavior of actions/download-artifact since v7.0.0

Tests

https://github.com/openvinotoolkit/nncf/actions/runs/22402028564/job/64853123212?pr=3951

@AlexanderDokuchaev AlexanderDokuchaev changed the title test [ci] Fix summary in test examples workflow Feb 25, 2026
@AlexanderDokuchaev AlexanderDokuchaev marked this pull request as ready for review February 25, 2026 15:11
@AlexanderDokuchaev AlexanderDokuchaev requested a review from a team as a code owner February 25, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.yml to pass test-results directory to the summary script instead of a glob pattern.
  • Update .github/scripts/pytest_md_summary.py to recursively discover XML reports using pathlib.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 raise xml.etree.ElementTree.ParseError (e.g., if a file isn’t a JUnit report or is truncated). parse_xml_report currently only handles FileNotFoundError, so a single bad XML can cause the whole script to hit the top-level except and potentially still exit successfully. Consider catching ET.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.

Comment thread .github/scripts/pytest_md_summary.py
Comment thread .github/scripts/pytest_md_summary.py

@andrey-churkin andrey-churkin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, LGTM!

@andrey-churkin andrey-churkin merged commit 27adb36 into openvinotoolkit:develop Feb 26, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants