mirror of
https://github.com/cline/cline.git
synced 2026-10-25 10:26:36 +08:00
* chore: upgrade Bun toolchain and embedded runtime to 1.4.2 Bun 1.4.1+ writes a valid ad-hoc Mach-O signature for bun build --compile output, so the CLI is no longer SIGKILLed on macOS 27, and 1.4 ships x64 runtimes as baseline-only, so compiled binaries run on pre-AVX2 CPUs. Pins engines.bun, packageManager, .tool-versions, every setup-bun step, and @types/bun. The lockfile only moves @types/bun/bun-types so the AI SDK hoisting is left untouched. * fix(core): swallow reader.cancel() rejection in web_fetch size guard Bun 1.4 rejects cancel() on an errored stream, which surfaced as an unhandled rejection right before the size-limit error was thrown. * build(cli): boot the hub from the compiled binary as a smoke test --version only proves the executable launches. Bun 1.4.1/1.4.2 have a compile-time chunk ordering regression with splitting: true that only shows up once real modules load, so start the hub daemon from the freshly compiled host binary in an isolated data dir and require a healthy status before the build is considered good. * test(core): stop asserting the forced-exit path in hub shutdown e2e Under Bun 1.3 http.Server.close() never settled while a WebSocket was open, so the daemon always exited through the 2s deadline and the e2e asserted the forced-exit log line. Bun 1.4 completes the graceful close (~50ms instead of ~2s in a side-by-side probe), so that line no longer appears. The exit code, timing, discovery cleanup, and endpoint checks still cover the behavior; the forced path stays covered by shutdown-coordinator.test.ts. * build(cli): isolate the smoke test hub from CLINE_HUB_DISCOVERY_PATH The env var overrides the data-dir-derived discovery record, so an inherited value would have pointed hub start/stop at a real hub.
123 lines
4.1 KiB
YAML
123 lines
4.1 KiB
YAML
name: sdk-test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "sdk/**"
|
|
- "apps/examples/desktop-app/**"
|
|
- ".github/workflows/sdk-test.yml"
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- "sdk/**"
|
|
- "apps/examples/desktop-app/**"
|
|
- ".github/workflows/sdk-test.yml"
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: .
|
|
|
|
jobs:
|
|
quality-checks:
|
|
runs-on: ubuntu-latest
|
|
name: Quality Checks
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: "1.4.2"
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Typecheck
|
|
run: |
|
|
bun run build:sdk
|
|
bun run -F @cline/cli build
|
|
bun run types
|
|
|
|
- name: Lint & Format
|
|
run: bun run lint
|
|
|
|
test:
|
|
needs: quality-checks
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
node-version: "24.x"
|
|
- os: windows-latest
|
|
node-version: "24.x"
|
|
runs-on: ${{ matrix.os }}
|
|
name: Test (${{ matrix.os }}, Node ${{ matrix.node-version }})
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: "1.4.2"
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build SDK
|
|
id: build_sdk_step
|
|
run: bun run build:sdk
|
|
|
|
- name: Build CLI
|
|
id: build_cli_step
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' }}
|
|
run: bun -F @cline/cli build
|
|
|
|
- name: Run Tests
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' && steps.build_cli_step.outcome == 'success' && matrix.os != 'windows-latest' }}
|
|
run: bun run test
|
|
|
|
- name: Run SDK Tests (Windows)
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' && steps.build_cli_step.outcome == 'success' && matrix.os == 'windows-latest' }}
|
|
run: bun -F './sdk/packages/**' test
|
|
|
|
- name: Run Desktop Sidecar Tests
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' && matrix.os == 'ubuntu-latest' }}
|
|
run: |
|
|
bun -F @cline/code test:sidecar
|
|
bun -F @cline/code test:sidecar-startup
|
|
|
|
- name: Run Desktop Settings UI Tests
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' }}
|
|
run: bun -F @cline/code test:settings-ui
|
|
|
|
- name: Smoke test SQLite under Node
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' && matrix.os != 'windows-latest' }}
|
|
timeout-minutes: 10
|
|
run: bun sdk/scripts/ci-node-smoke.ts
|
|
|
|
- name: Run TUI e2e tests
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' && steps.build_cli_step.outcome == 'success' && matrix.os == 'ubuntu-latest' && matrix.node-version == '24.x' }}
|
|
run: bun -F @cline/cli test:e2e:cli:tui
|
|
|
|
- name: Verify packages are publishable
|
|
if: ${{ !cancelled() && steps.build_sdk_step.outcome == 'success' && steps.build_cli_step.outcome == 'success' && matrix.os == 'ubuntu-latest' && matrix.node-version == '24.x' }}
|
|
run: bun sdk/scripts/check-publish.ts
|