Skip to content

chore(ci): speed up CI with uvx semantic-release, xdist, and uv caching - #1083

Merged
allenporter merged 3 commits into
Python-roborock:mainfrom
allenporter:optimize_ci_pipeline
Nov 23, 2026
Merged

allenporter merged 3 commits into
Python-roborock:mainfrom
allenporter:optimize_ci_pipeline

Conversation

@allenporter

@allenporter allenporter commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Speeds up PR CI wall-clock time by ~52% (112s → 54s) and total runner time by ~42% (382s → 223s) with minimal workflow changes:

Summary of Changes

  • Run semantic-release dry-run via uv tool run in test-release instead of building the Docker action from scratch (eliminating the ~80s Docker build and redundant No-op step), and skip pip install uv in build_command when uv is already on PATH.
  • Parallelize unit tests with pytest-xdist (-n auto) in the test job.
  • Collect & upload branch coverage only on Python 3.14 (COVERAGE_PYTHON_VERSION) instead of both 3.11 and 3.14, and drop --log-cli-level=DEBUG -vv -s and unused uv pip install pip.
  • Enable enable-cache: true on astral-sh/setup-uv@v7 across jobs and tighten EMQX --health-interval from 5s to 1s.
  • Centralize CI Python version variables (DEFAULT_PYTHON_VERSION, COVERAGE_PYTHON_VERSION) in a top-level env: block with inline comments.

Measured Before vs. After

Job Baseline (#45087614620) After (#45101223417) Delta
Test Semantic Release 109s 12s -97s (-89%)
test (3.11) 68s 27s -41s (-60%)
test (3.14) 58s 46s -12s (-21%)
test-mqtt (3.11) 58s 47s -11s (-19%)
test-mqtt (3.14) 49s 52s +3s
lint 15s 15s 0s
Lint Commit Messages 18s 14s -4s
Build Package 8s 10s +2s
Wall clock (critical path) 112s 54s -58s (-52%)
Total runner time 382s 223s -159s (-42%)

@allenporter
allenporter marked this pull request as ready for review November 23, 2026 02:41
Copilot AI balanced review requested due to automatic review settings November 23, 2026 02:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@allenporter
allenporter requested a review from Lash-L November 23, 2026 02:57

@Lash-L Lash-L left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goated, ty

@allenporter
allenporter merged commit 93f0d98 into Python-roborock:main Nov 23, 2026
9 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.

3 participants