chore: Add GitHub CI workflow and comprehensive test suite - #20
Conversation
- cache.service: add Redis store mock tests (rotateRefreshToken, invalidatePattern) - socket.gateway: add JWT error handling, leaveRoom, sendToRoom tests - snowflake: add new test file for constructor, nextId, singleton functions - cache.constants: add tests for all CacheKeys factory functions - decorators: add basic tests for Cookies and UserInfo Coverage: 87% → 93% statements, 79% → 88% branches
- Add e2e tests for auth, cats, groups, users modules - Fix Permission.code column type (add explicit varchar for TypeORM) - Fix PermissionGuard to use request.user.id instead of useRequestUser() (guards execute before interceptors, so AsyncLocalStorage is not available) - Fix USER_ALREADY_EXISTS status code: 400 → 409 (Conflict) - Fix cookie-parser import style for vitest SSR compatibility - Fix specialRoles null safety in user deletion - Add fileParallelism: false to vitest config for e2e sequential execution - Update TestHelper to use appUse() for proper middleware/interceptor setup
- Add permissions e2e tests (GET all, GET by id, PATCH) - Add roles e2e tests (CRUD with SuperAdmin auth) - Update eslint config to relax strict type rules for test files
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 44 minutes and 52 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (83)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
概述
为项目添加 GitHub Actions CI 工作流和完整的测试基础设施,显著提升代码质量和可维护性。
主要改动
CI/CD
测试覆盖
test-helper.ts)功能增强
代码质量
测试计划
影响范围
相关文件
.github/workflows/ci.yml- CI 配置apps/server/vitest.config.ts- Vitest 配置apps/server/tests/- 测试文件目录apps/web/src/services/api/http-factory/- HTTP 客户端增强