Skip to content

Conversation

@vaebe
Copy link
Owner

@vaebe vaebe commented Nov 13, 2025

添加 PR 自动测试工作流

变更内容

  • 新增 .github/workflows/test.yml 文件
  • 在 PR 提交时自动运行 pnpm --filter ccui test 命令
  • 确保代码提交前测试通过

功能特性

  • 触发条件: 仅在向 main 分支提交 PR 时执行
  • 运行环境: Ubuntu latest + Node.js 22.x
  • 包管理: 使用 pnpm v10 进行依赖管理
  • 测试范围: 专门针对 ccui 包执行测试

工作流步骤

  1. 检出代码仓库
  2. 安装 pnpm 包管理器
  3. 配置 Node.js 环境和缓存
  4. 安装项目依赖
  5. 运行 ccui 包的单元测试

预期效果

  • 提高代码质量保障
  • 在合并前自动验证测试通过
  • 减少主分支引入错误的风险

这个工作流将确保所有 PR 在合并到 main 分支前都经过完整的测试验证。

Summary by CodeRabbit

  • Chores
    • Enhanced continuous integration infrastructure with automated testing workflows to improve code quality and development processes.

@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Two GitHub Actions workflows are added to automate CI processes. The first workflow builds components in the CLI package on pull requests, while the second runs tests for the CCUI package. Both workflows use Node.js 22.x with pnpm dependency management on ubuntu-latest runners.

Changes

Cohort / File(s) Change Summary
CI Workflows
\.github/workflows/buildComponents.yml, \.github/workflows/test.yml
Adds two new GitHub Actions workflow files. Both trigger on pull requests to main branch, run on ubuntu-latest with Node.js 22.x matrix, and execute pnpm-based setup and test commands—one for component building in the CLI package, the other for running CCUI tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify Node.js 22.x compatibility and pnpm 10 requirements for both packages
  • Confirm the filtered test commands target the correct packages (cli, ccui)
  • Check caching configuration for pnpm dependencies

Poem

🐰 Two workflows hop into place,
Building and testing with GitHub's grace,
Pnpm and Node in harmony stay,
CI/CD magic runs night and day! ✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-github-action

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce8709a and ec25e1d.

📒 Files selected for processing (2)
  • .github/workflows/buildComponents.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vaebe vaebe merged commit 9a509c5 into main Nov 13, 2025
3 of 4 checks passed
@vaebe vaebe deleted the feat-github-action branch November 13, 2025 14:12
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.

2 participants