GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — ci: report code coverage on pull requests by ReubenBond · Pull Request #10733 · dotnet/orleans Conversation
|
| File | Description |
|---|---|
test/Directory.Build.props |
Adds Microsoft.Testing.Extensions.CodeCoverage to test apps for net10.0. |
Directory.Packages.props |
Introduces a central version pin for the Code Coverage extension. |
.github/workflows/ci.yml |
Enables coverage collection on PR Linux/net10 test runs and uploads suite-scoped coverage artifacts. |
.github/workflows/test-results.yml |
Adds a workflow_run coverage reporter which summarizes artifacts and publishes a check run. |
.github/scripts/summarize-coverage.py |
New script to parse Cobertura XML, aggregate line coverage, and emit JSON/Markdown summaries. |
.github/coverage.config.xml |
Adds MTP code coverage configuration for static instrumentation and exclusions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The current Ubuntu/net10 coverage jobs fail because a filtered test module with zero selected tests times out in MTP's TRX process-lifetime handler after coverage is enabled. The module aborts with exit 134 (System.TimeoutException in TrxProcessLifetimeHandler), so the aggregate run reports an infrastructure error despite 0 failed tests. This occurs in BVT, SlowBVT, and Functional coverage jobs. Please adjust the coverage invocation/project selection so zero-selection modules complete cleanly without masking real failures.\n\nExample job: https://github.com/dotnet/orleans/actions/runs/32457710648/job/96698103245 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/ci.yml:1100
test_output_* artifact for pull_request runs on ubuntu-latest/net10.0. With the new coverage collection happening specifically in that matrix slice, skipping the artifact prevents test-results.yml from reporting those suite outcomes (it only reads test_output_* artifacts). If coverage and test outcomes are both desired, upload test results unconditionally and keep excluding **/*.cobertura.xml to avoid duplication. - name: Archive Test Results
if: always() && (github.event_name != 'pull_request' || matrix.os != 'ubuntu-latest' || matrix.framework != 'net10.0')
continue-on-error: true
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Previously missed (1) — in code that hasn't changed since the last review.
.github/workflows/test-results.yml:56
python, which is not guaranteed to exist as an alias on all ubuntu-latest images (some only provide python3). Using python3 makes the workflow more robust without changing behavior. python .github/scripts/summarize-coverage.py coverage \
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Previously missed (2) — in code that hasn't changed since the last review.
.github/workflows/ci.yml:1123
dotnet build and then runs dotnet test --no-build --framework net10.0. Since test projects target net8.0;net10.0 by default (see test/Directory.Build.props:19), this build step will typically build both TFMs even though the job only runs the net10.0 tests, increasing job time. Consider dropping the explicit build step and letting dotnet test --framework net10.0 build only the required net10.0 graph. - name: Build
run: dotnet build
- name: Collect coverage
run: dotnet test
--no-build
.github/scripts/summarize-coverage.py:36
get_repository_path accepts filenames which start with the source_root prefix (or /_/src/) but does not reject ../. path segments. A crafted Cobertura report could therefore escape src/ (e.g. .../src/../.github/...) and skew the coverage calculation even though the summary claims it only measures files under src/. Consider rejecting filenames which contain ./.. segments after the prefix is stripped. if normalized.casefold().startswith(source_prefix.casefold()):
return f"src/{normalized[len(source_prefix):]}"
if normalized.startswith(DETERMINISTIC_SOURCE_PREFIX):
return f"src/{normalized[len(DETERMINISTIC_SOURCE_PREFIX):]}"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
4bf3682 to
445b1c4
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
445b1c4 to
87b4fdd
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/test-results.yml:73
.github/scripts/test_summarize_coverage.py) was added, but this workflow job doesn't run it. Since this job runs the summarizer on trusted default-branch code, executing the unit tests here would help catch XML parsing/path-handling regressions early. - name: Summarize coverage
id: coverage
run: |
python .github/scripts/summarize-coverage.py coverage \
--source-root "$GITHUB_WORKSPACE/src" \
--markdown-output coverage-summary.md \
--json-output coverage-summary.json
cat coverage-summary.md >> "$GITHUB_STEP_SUMMARY"
echo "line-rate=$(jq -r .line_rate_display coverage-summary.json)" >> "$GITHUB_OUTPUT"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
98c3154 to
70fa7f5
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.