Skip to content

Feat: Add Python Coverage - #410

Merged
AnnaSasDev merged 11 commits into
corefrom
coverage-py
Aug 26, 2026
Merged

Feat: Add Python Coverage#410
AnnaSasDev merged 11 commits into
corefrom
coverage-py

Conversation

@AnnaSasDev

Copy link
Copy Markdown
Member

No description provided.

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.
@AnnaSasDev AnnaSasDev self-assigned this Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Code Coverage Report

Language Coverage Delta Trend
TypeScript 94.1% +0.5% 📈 improved
C# 17.1% +8.0% 📈 improved
Python 90.6% +90.6% 📈 improved

C# Project Breakdown

Project Coverage Lines Covered
InfiniFrame.WebServer 83.3% 672 560
InfiniFrame.BlazorWebView 62.8% 6880 4324
InfiniFrame.Blazor 47.5% 1840 874
InfiniFrame 19.4% 214816 41736
InfiniFrame.Shared 14.4% 106304 15315
InfiniFrame.NativeBridge 12.6% 136235 17130

github-actions Bot and others added 5 commits August 26, 2026 14:51
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.
@github-actions

Copy link
Copy Markdown
Contributor

📊 Code Coverage Report

Language Coverage Delta Trend
TypeScript 94.1% 0.0% ➡️ unchanged
C# 17.1% 0.0% ➡️ unchanged
Python 90.6% 0.0% ➡️ unchanged

C# Project Breakdown

Project Coverage Lines Covered
InfiniFrame.WebServer 83.3% 672 560
InfiniFrame.BlazorWebView 62.8% 6880 4324
InfiniFrame.Blazor 47.5% 1840 874
InfiniFrame 19.4% 214816 41755
InfiniFrame.Shared 14.4% 106304 15321
InfiniFrame.NativeBridge 12.6% 136235 17130

@AnnaSasDev
AnnaSasDev merged commit b93ee03 into core Aug 26, 2026
44 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.

1 participant