Feat: Add Python Coverage - #410
Merged
Merged
Conversation
Move helper scripts out of .github/scripts into a top-level scripts/ dir and update all workflows/actions to use the new paths. Adjust REPO_ROOT resolutions in bumped scripts (bump_version, update_native_vendor_deps, validate_package_id_prefix). Add scripts/coverage_report.py to aggregate TypeScript/Python/C# coverage, update shared-coverage and testing workflows to produce/upload python-coverage and invoke the new reporter, and add unit tests for the new reporter and adjusted test script imports. Also rename and update several test files and workflow references accordingly.
Move script files into the repository scripts folder and add tests/scripts entries in the solution. Add consistent section headers (Imports / Constants / Code) across multiple scripts (bump_version.py, coverage_report.py, sync_github_checks.py, update_native_vendor_deps.py, validate_package_id_prefix.py). Update small function signatures and related tests to match (adjusted request/download/run payload parameters, test imports and minor test scaffolding). Changes are largely organizational and test updates to accommodate the refactor.
The shared CI workflows now default to enabling code coverage, and the Python workflow accepts an `enable_coverage` input to toggle coverage collection at runtime. Coverage is only uploaded when enabled, while test runs without coverage remain available for manual opt-out.
This change adds a project-level pytest configuration and package-style imports for the Python scripts tests. It updates the shared workflow to run the full Python test suite, fixes Cobertura XML parsing for nested XML nodes, and adjusts test expectations to match the current script behavior.
Contributor
📊 Code Coverage Report
C# Project Breakdown
|
Replace OrderedDict with a plain dict and use json.dumps(..., indent=4) plus a trailing newline to produce a readable coverage badge JSON. Add <ExcludeByFile> patterns to Directory.Build.props to ignore generated files (*.g.cs, *.g.props, *.g.targets) and obj/bin folders during analysis, reducing noise from generated artifacts.
Add a target_sha input to the shared coverage workflow and pass the original commit SHA from the CI workflow. When coverage pushes a badge commit, the workflow now copies completed check runs from the original SHA onto the new SHA so status remains aligned. This also adds the required checks:write permission for creating synced check-runs.
Contributor
📊 Code Coverage Report
C# Project Breakdown
|
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.
No description provided.