Skip to content

Comments

chore: add build platform libs in api v2 github actions#23862

Merged
hbjORbj merged 1 commit intomainfrom
github-actions-api-v2-build
Sep 16, 2025
Merged

chore: add build platform libs in api v2 github actions#23862
hbjORbj merged 1 commit intomainfrom
github-actions-api-v2-build

Conversation

@ThyMinimalDev
Copy link
Contributor

What does this PR do?

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

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):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@vercel
Copy link

vercel bot commented Sep 16, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Sep 16, 2025 7:50am
cal-eu Ignored Ignored Sep 16, 2025 7:50am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Walkthrough

Updates 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)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive The PR description is mostly the repository's generic template with placeholders and unchecked checklist items and does not describe the actual file changes, the added build step, or the rationale, making the description too vague to verify alignment with the changeset. Please update the PR description with a concise summary of the change (which workflows/files were modified and why), any linked issue numbers, and testing or CI expectations so reviewers can assess intent and impact.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "chore: add build platform libs in api v2 github actions" accurately and concisely summarizes the primary change in the diff — adding a pre-build of the @calcom/platform-libraries to the API v2 GitHub Actions workflows (.github/workflows/e2e-api-v2.yml and .github/workflows/unit-tests.yml). It is specific, relevant, and uses an appropriate conventional prefix.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch github-actions-api-v2-build

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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.

❤️ Share

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

@graphite-app graphite-app bot requested a review from a team September 16, 2025 07:50
@keithwillcode keithwillcode added core area: core, team members only foundation platform Anything related to our platform plan labels Sep 16, 2025
@graphite-app graphite-app bot requested a review from a team September 16, 2025 07:50
@dosubot dosubot bot added the ci area: CI, DX, pipeline, github actions label Sep 16, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 7e415b4 and c1f5ebd.

📒 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.

@hbjORbj hbjORbj enabled auto-merge (squash) September 16, 2025 08:18
@github-actions
Copy link
Contributor

github-actions bot commented Sep 16, 2025

E2E results are ready!

@hbjORbj hbjORbj merged commit e8c2d4f into main Sep 16, 2025
153 of 163 checks passed
@hbjORbj hbjORbj deleted the github-actions-api-v2-build branch September 16, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci area: CI, DX, pipeline, github actions core area: core, team members only foundation platform Anything related to our platform plan ready-for-e2e size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants