Add codecov#1889
Conversation
Greptile SummaryThis PR integrates Codecov into the CI pipeline by consolidating the test and coverage steps, adding OIDC-based upload actions for both coverage XML and JUnit test results, and introducing a Confidence Score: 4/5Safe to merge with one minor remaining gap: the Upload coverage step lacks if: ${{ !cancelled() }}, so a mypy failure silently drops the coverage report. All previous P1 findings (missing OIDC permission, push-only gating, missing coverage combine, missing junitxml) have been resolved. The one unfixed item from prior review threads keeps the ceiling at 4. .github/workflows/ci.yml — the Upload coverage step condition. Important Files Changed
Sequence DiagramsequenceDiagram
participant GH as GitHub Actions
participant Runner as CI Runner
participant Codecov as Codecov
GH->>Runner: Trigger (push or pull_request)
Runner->>Runner: Install dependencies
Runner->>Runner: coverage run -m pytest --junitxml=junit.xml
Runner->>Runner: coverage combine
Runner->>Runner: coverage xml → coverage.xml
Runner->>Runner: mypy (if: !cancelled)
Runner->>Codecov: Upload coverage.xml (OIDC, fail_ci_if_error)
Runner->>Codecov: Upload junit.xml test results (if: !cancelled)
Reviews (9): Last reviewed commit: "Merge branch 'dev' into codecov" | Re-trigger Greptile |
Updated coverage upload steps and adjusted paths.
| if: github.event_name == 'push' | ||
| run: | | ||
| /entrypoint.sh bash -c "source .venv/bin/activate && _DIMOS_COV=1 coverage run -m pytest --durations=0 -m 'not (tool or mujoco)' && coverage combine && coverage html && coverage report" | ||
| /entrypoint.sh bash -c "source .venv/bin/activate && _DIMOS_COV=1 coverage run -m pytest --durations=0 -m 'not (tool or mujoco)' && coverage xml" |
There was a problem hiding this comment.
Missing
coverage combine drops subprocess coverage data
conftest.py sets COVERAGE_PROCESS_START when _DIMOS_COV=1, which instructs coverage.py to instrument subprocesses and write their data to separate .coverage.<pid> files. Without coverage combine before coverage xml, those files are ignored — only the main-process .coverage file is included in the XML report. The old CI command explicitly ran coverage combine; removing it silently undercounts coverage. The fix is coverage run -m pytest ... && coverage combine && coverage xml.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Add coverage configuration options for branch, parallel, and exclusion patterns.
Add codecov, so we can easily see coverage changes in each PR.