Skip to content

ci: add workflows: build-lib / build-docs#366

Merged
kagol merged 1 commit intomainfrom
kagol/add-workflow-build-lib-and-docs
Oct 29, 2025
Merged

ci: add workflows: build-lib / build-docs#366
kagol merged 1 commit intomainfrom
kagol/add-workflow-build-lib-and-docs

Conversation

@kagol
Copy link
Copy Markdown
Member

@kagol kagol commented Oct 29, 2025

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Chores
    • Added automated documentation build workflow that triggers on main branch updates and pull requests
    • Added automated library build workflow that triggers on main branch updates and pull requests
    • Both workflows include merge queue event triggers for streamlined integration

@github-actions github-actions Bot added the ci CI/CD label Oct 29, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 29, 2025

Walkthrough

Two new GitHub Actions workflows are introduced for automating documentation and library builds. Both trigger on pushes to main, pull requests targeting main, and merge group events, running on Ubuntu with pnpm-based build steps and Node.js version 20.

Changes

Cohort / File(s) Summary
New GitHub Actions Workflows
.github/workflows/build-docs.yml, .github/workflows/build-lib.yml
Two new CI/CD workflows for automating documentation and library builds; both trigger on main branch events and merge groups, run on ubuntu-latest, install pnpm and Node.js 20, install dependencies, and execute respective build commands (pnpm build and pnpm build:lib)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Both workflows follow a standard, repetitive pattern with minimal variation
  • No complex logic, custom scripts, or conditional branching present
  • Straightforward YAML structure with consistent setup steps across both files

Poem

🐰 Two workflows now hop and bound,
Building docs and libs without a sound,
On every push, they spring to life,
Automating builds with helpful strife,
Main branch blessed with CI delight! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "ci: add workflows: build-lib / build-docs" directly and accurately describes the main changes in the changeset. It clearly indicates that two GitHub Actions workflow files were added—build-lib.yml and build-docs.yml—with appropriate CI-related classification using the "ci:" prefix. The title is concise, specific, and follows conventional commit message formatting, making it immediately clear to teammates reviewing the history what was changed and why. The title avoids vague terminology and noise while capturing the essential nature of the modifications.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kagol/add-workflow-build-lib-and-docs

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.

@kagol kagol force-pushed the kagol/add-workflow-build-lib-and-docs branch from f064208 to 8e0ca78 Compare October 29, 2025 08:35
Copy link
Copy Markdown

@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/build-lib.yml (3)

3-12: Consider consolidating workflows to reduce duplication.

The build-lib.yml workflow is nearly identical to build-docs.yml except for the final build command (line 32). Both workflows share the same triggers, OS, and setup steps, violating the DRY principle and increasing maintenance overhead.

Consider either:

  • Creating a reusable workflow (.github/workflows/build.yml) with a parameter for the build command
  • Using a matrix build approach in a single workflow
  • Extracting common setup into a composite action

18-29: Add dependency caching to speed up workflow runs.

Each workflow run installs dependencies from scratch, which can significantly slow down CI/CD. Add pnpm caching using the official pnpm cache action to reuse cached dependencies across runs.

Apply this diff to add caching:

       - name: Install pnpm
         uses: pnpm/action-setup@v4

+      - name: Get pnpm store directory
+        shell: bash
+        run: |
+          echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
+
+      - name: Setup pnpm cache
+        uses: actions/cache@v4
+        with:
+          path: ${{ env.STORE_PATH }}
+          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+          restore-keys: |
+            ${{ runner.os }}-pnpm-store-
+
       - name: Set node

24-26: Consider pinning Node.js to a minor version.

Using only the major version (20) can lead to inconsistent behavior across different workflow runs if Node.js updates occur. Specify a minor version (e.g., 20.x or 20.11) for better reproducibility and predictability.

Apply this diff to pin the version more specifically:

       - name: Set node
         uses: actions/setup-node@v4
         with:
-          node-version: 20
+          node-version: 20.x
.github/workflows/build-docs.yml (1)

1-32: Consolidate duplicate workflow configuration.

This workflow shares identical structure and configuration with build-lib.yml, differing only in the final build command. Refer to the consolidation recommendation in the build-lib.yml review to eliminate this duplication.

Additionally, apply the same optimizations recommended for build-lib.yml:

  • Add pnpm dependency caching
  • Pin Node.js to a minor version (e.g., 20.x)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f52c3e and 8e0ca78.

📒 Files selected for processing (2)
  • .github/workflows/build-docs.yml (1 hunks)
  • .github/workflows/build-lib.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test

@kagol kagol merged commit 0458b50 into main Oct 29, 2025
4 of 5 checks passed
@kagol kagol deleted the kagol/add-workflow-build-lib-and-docs branch January 5, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant