Skip to content

perf(ci): cut CI wall time from ~10min to ~5min#512

Merged
hotlong merged 2 commits intomainfrom
copilot/optimize-ci-and-test-scripts
Feb 14, 2026
Merged

perf(ci): cut CI wall time from ~10min to ~5min#512
hotlong merged 2 commits intomainfrom
copilot/optimize-ci-and-test-scripts

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 14, 2026

CI runs ~9-10 minutes per push. Root cause: tests execute twice and several workflows contain redundant rebuilds.

Changes

ci.yml — eliminates ~5min

  • Double test run: pnpm test then pnpm test:coverage re-runs all ~4000 tests. Replaced with single pnpm test:coverage.
  • Dead matrix: node-version: [20.x] single-element matrix adds overhead for nothing. Removed.
  • Concurrency: Added cancel-in-progress: true keyed on PR number to kill stale runs.
  • E2E cache: Switched from actions/cache@v5 to actions/cache/restore@v5 — E2E only reads the build job's turbo cache, no need to re-save.
  • Docs gate: Docs job now skippable on PRs via [skip docs] in title.

storybook-tests.yml — eliminates redundant rebuild

  • Merged 2 jobs → 1: storybook-test depended on storybook-build but shared no artifacts, so it rebuilt everything from scratch. Now a single job.
  • Path filtering: Only triggers on packages/**, .storybook/**, pnpm-lock.yaml.
  • Concurrency: Added cancel-in-progress.

Other workflows

  • changeset-release.yml: Added missing turbo cache step.
  • visual-regression.yml, performance-budget.yml, size-check.yml: Added concurrency groups and/or turbo cache where missing.
Original prompt

优化 ci 脚本和自动化测试脚本,目前每次更新都要9分钟


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 14, 2026 2:52pm
objectui-demo Ready Ready Preview, Comment Feb 14, 2026 2:52pm
objectui-storybook Error Error Feb 14, 2026 2:52pm

Request Review

Key optimizations:
- ci.yml: Merge double test execution (pnpm test + pnpm test:coverage) into single run, saving ~5min
- ci.yml: Remove unnecessary node-version matrix (only 20.x was used)
- ci.yml: Add concurrency control to cancel in-progress runs on same PR
- ci.yml: Use cache/restore for E2E job to leverage build job's turbo cache
- ci.yml: Add conditional docs build (skippable via [skip docs] in PR title)
- storybook-tests.yml: Merge 2-job pipeline into 1 job (was rebuilding everything in second job)
- storybook-tests.yml: Add path filtering to skip when no package/storybook changes
- storybook-tests.yml: Add concurrency control
- changeset-release.yml: Add turbo cache
- visual-regression.yml: Add concurrency control
- performance-budget.yml: Add concurrency control
- size-check.yml: Add turbo cache and concurrency control

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize CI and automation test scripts for faster execution perf(ci): cut CI wall time from ~10min to ~5min Feb 14, 2026
Copilot AI requested a review from hotlong February 14, 2026 14:39
@hotlong hotlong marked this pull request as ready for review February 14, 2026 15:14
Copilot AI review requested due to automatic review settings February 14, 2026 15:14
@hotlong hotlong merged commit 668e0bf into main Feb 14, 2026
5 of 6 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes CI/CD workflows to reduce wall time from ~10 minutes to ~5 minutes by eliminating redundant test runs, removing unnecessary build steps, and adding concurrency controls to cancel stale workflow runs.

Changes:

  • Eliminated double test execution in ci.yml by running only pnpm test:coverage instead of pnpm test followed by pnpm test:coverage
  • Consolidated Storybook workflow from 2 sequential jobs into 1, eliminating redundant package rebuild
  • Added concurrency groups with cancel-in-progress: true to all performance-critical workflows
  • Optimized caching strategy for E2E tests (read-only cache restore) and added missing turbo cache to release workflows
  • Made docs build job skippable on PRs via [skip docs] in PR title

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/ci.yml Removed matrix strategy, consolidated test execution to single test:coverage run, changed E2E to use cache/restore, added concurrency group and docs job skip condition
.github/workflows/storybook-tests.yml Merged storybook-build and storybook-test into single job, added path filtering and concurrency group
.github/workflows/visual-regression.yml Added concurrency group with cancel-in-progress
.github/workflows/size-check.yml Added turbo cache step and concurrency group
.github/workflows/performance-budget.yml Added concurrency group with cancel-in-progress
.github/workflows/changeset-release.yml Added missing turbo cache step for build optimization

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