Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Speed up the coverage job (about 25 minutes since coverage became real)

未关闭
#898 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, python

调研方向

Start with the coverage job in ci.yml and inspect its step timings in the run for main, especially the analytic IK tests. Try COVERAGE_CORE=sysmon in the coverage step and compare the reported total with 85.98%. Done means the job runs faster and the coverage change is measured and explained; the issue also lists larger follow-up options if that first trial is insufficient.

由索引模型根据 Issue 内容生成。

描述

tech-debt

Since #897 made coverage real, the coverage job in ci.yml takes about 25 minutes (1,503 s on the run for main), where the other jobs take 10 to 15. It runs on every pull request and every push to main, since the job has no if:. It is not a required check, so it never blocks a merge, but it is the last job to finish on every run, and the one that tells the Codecov number.

Why it is slow

It runs the whole suite with coverage tracing, including the tests marked slow (the analytic IK tests that compile generated C and C++ code, about 110 s untraced), and it runs them under the default tracing core.

Ideas, cheapest first

  • COVERAGE_CORE=sysmon in the coverage step. Python 3.12 has a lighter tracing core. Try it on the job, and compare the totals with the current 85.98%, since a different core can change which lines count.
  • Do not trace the slow tests: run them in the matrix job on Linux with no coverage, and take coverage from the fast tests only. Check what the analytic IK tests contribute (they exercise about 4,000 lines).
  • Split the job with pytest-xdist and combine the data (coverage combine), as the tests are independent.
  • Run coverage on pushes to main and weekly, not on every PR. The PR would lose its Codecov patch status, which is informational now anyway.
  • Cache what is rebuilt on every run: the package install, robot_descriptions assets (already cached).

Measure first

The job log has the timing for each step. Note the compile-based tests in particular: on the Windows runner they were slow enough to hit the 50 s limit, so a Linux job that traces them may be paying the same cost.

Related: #894 (code-quality follow-ups), petercorke/rvc-ecosystem#26 (the CI audit that found the coverage problem).

主要语言
C++
星标
3.6k
派生
645
平均合并
1 天 8 小时
30 天内合并 PR
145

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

petercorke/robotics-toolbox-python 的其他 Issue

查看 petercorke/robotics-toolbox-python 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。