diff --git a/.github/workflows/sdk-ci.yml b/.github/workflows/sdk-ci.yml new file mode 100644 index 0000000..7c87bba --- /dev/null +++ b/.github/workflows/sdk-ci.yml @@ -0,0 +1,37 @@ +# GitHub Actions CI Workflow for SDK Build Checks + +name: SDK CI + +on: + pull_request: + branches: + - main + paths: + - 'packages/sdk/**' + - '.github/workflows/sdk-ci.yml' + +jobs: + build: + name: Build and Validate SDK + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v3 + with: + version: 8.10.0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.x' + cache: 'pnpm' + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Build SDK + run: pnpm --filter susuchain-sdk build diff --git a/docs/SDK_CI.md b/docs/SDK_CI.md new file mode 100644 index 0000000..0b3996a --- /dev/null +++ b/docs/SDK_CI.md @@ -0,0 +1,17 @@ +# GitHub Actions CI Workflow for SDK Build Checks + +This document details the architectural design and setup of the Continuous Integration (CI) pipeline configured to automatically validate the SDK build. + +## Requirements + +1. **Automation**: Run verification checks automatically on every pull request targeting the `main` branch. +2. **Path Filtering**: Trigger only when code under `packages/sdk` or the workflow configuration itself changes. +3. **Correctness**: Build the SDK using Node.js and the designated package manager (`pnpm`). +4. **Performance**: Utilize package manager cache configurations to minimize build and execution latency. + +## Architecture + +- **CI Runner**: `ubuntu-latest` +- **Node.js Version**: Defined in configuration to match workspace specification. +- **Package Manager**: `pnpm` (configured with lockfile checking and dependency cache store restoration). +- **Execution Script**: `pnpm --filter susuchain-sdk build`