[codex] fix unit test coverage reporting#3319
Draft
JasonW404 wants to merge 2 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Summary
Fix the parallel unit-test runner so CI coverage reporting matches the pre-parallel behavior while preserving file-level parallel execution. Also fix Codecov uploader selection on ARM GitHub Actions runners.
Root Cause
PR #3285 changed unit tests from serial
--cov-appendinto per-file coverage data files followed bycoverage combine. The new flow only checked thatcoverage.xmlexisted and did not fully restore the previous coverage API reporting behavior. The combine/xml phase also needed to consistently usetest/.coveragercwithout relying on an unsupported--rcfileplacement for the installed coverage version.The unit-test workflow runs on
ubuntu-24.04-arm, butcodecov-action@v4can mis-detect the uploader platform as plain linux. The uploader then fails duringcreate-commitwith a shell syntax error while the workflow stays green becausefail_ci_if_erroris false.Changes
COVERAGE_RCFILEto coverage combine/xml so both phases usetest/.coveragerc.COVERAGE_PROCESS_STARTin per-file pytest subprocesses.test/coverage_html.codecov-action@v4to@v5and setos: linux-arm64for ARM runners.Validation
python3 -m py_compile test/run_all_test.pygit diff --checkuv sync --extra data-process --extra testuv pip install -e "../sdk[dev]".coverage.*files.test/coverage.xml, emitted coverage report, total coverage about 78.8%.NEXENT_PYTEST_TARGETS='test/sdk/core/models/test_prompt_cache.py' NEXENT_PYTEST_WORKERS=1 NEXENT_PYTEST_FILE_TIMEOUT=120 backend/.venv/bin/python test/run_all_test.pytest/coverage.xmlplustest/coverage_html/.