chore: add build platform libs in api v2 github actions#23862
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
WalkthroughUpdates CI workflows to pre-build the @calcom/platform-libraries workspace before running tests. In .github/workflows/e2e-api-v2.yml, the Run Tests step in apps/api/v2 now runs: yarn workspace @calcom/platform-libraries build && yarn test:e2e, with EXIT_CODE reflecting the combined command. In .github/workflows/unit-tests.yml, the Run API v2 tests step similarly runs: yarn workspace @calcom/platform-libraries build && yarn test. No other workflow settings or exported/public entity declarations are changed. Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
.github/workflows/unit-tests.yml (2)
24-24: Pre‑build is fine, but consider building once at the repo root to avoid redundant work.Running a single workspace build per job is OK, but it may miss upstream workspace builds and duplicates work between Unit/E2E. Prefer a single root build step (e.g., “yarn build”) before tests, leveraging cache. Keep the per‑job build only if API v2 specifically needs a fresh local build.
23-24: Fix NODE_OPTIONS flag: use hyphens, not underscores.Node expects --max-old-space-size; the underscore variant may be ignored. Align with the E2E workflow which already uses hyphens.
Apply this diff:
- export NODE_OPTIONS="--max_old_space_size=8192" + export NODE_OPTIONS="--max-old-space-size=8192".github/workflows/e2e-api-v2.yml (2)
74-77: Improve failure diagnostics by splitting build/test statuses.Current echo can’t tell whether build or tests failed. Split steps or capture separate codes.
Apply this diff:
- yarn workspace @calcom/platform-libraries build && yarn test:e2e - EXIT_CODE=$? - echo "yarn workspace @calcom/platform-libraries build && yarn test:e2e command exit code: $EXIT_CODE" - exit $EXIT_CODE + set -o pipefail + yarn workspace @calcom/platform-libraries build + BUILD_CODE=$? + if [ "$BUILD_CODE" -ne 0 ]; then + echo "platform-libraries build failed with exit code: $BUILD_CODE" + exit $BUILD_CODE + fi + yarn test:e2e + TEST_CODE=$? + echo "e2e tests exit code: $TEST_CODE" + exit $TEST_CODE
70-77: Consider building once at the root to reuse artifacts across jobs.Add a root build step (e.g., “yarn build”) before this step to warm outputs and leverage cache, then keep this step lightweight (or skip if not needed).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/e2e-api-v2.yml(1 hunks).github/workflows/unit-tests.yml(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-15T12:58:12.812Z
Learnt from: CR
PR: calcom/cal.com#0
File: AGENTS.md:0-0
Timestamp: 2025-09-15T12:58:12.812Z
Learning: Run integration tests with `yarn test <filename> -- --integrationTestsOnly`
Applied to files:
.github/workflows/unit-tests.yml
📚 Learning: 2025-09-15T12:58:12.812Z
Learnt from: CR
PR: calcom/cal.com#0
File: AGENTS.md:0-0
Timestamp: 2025-09-15T12:58:12.812Z
Learning: Use `yarn build` to build all packages
Applied to files:
.github/workflows/unit-tests.yml
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (2)
.github/workflows/unit-tests.yml (1)
24-24: Double‑check Yarn workspace invocation from a subdirectory.“yarn workspace … build” should resolve from any workspace cwd under Yarn Berry, but please confirm the repo uses Berry and that @calcom/platform-libraries exists. If not guaranteed, invoke from repo root or add a dedicated build step at the root.
.github/workflows/e2e-api-v2.yml (1)
74-77: LGTM: gate tests on build success and propagate exit code.The combined command with explicit EXIT_CODE capture is correct and preserves failure status.
E2E results are ready! |
What does this PR do?
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist