docs(migration): mark G-7 complete — web-only achieved #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | ||
|
Check failure on line 1 in .github/workflows/ci.yml
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| cache: pnpm | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.pnpm-store | ||
| key: ${{ runner.os }}-pnpm-${{ hashFiles("pnpm-lock.yaml") }} | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm run build | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| - name: Cache Cargo registry + target | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: target -> target | ||
| - name: Build kimi CLI (debug) | ||
| run: cargo build -p kimi-cli | ||
| - name: Smoke test kimi CLI | ||
| run: ./target/debug/kimi --version | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| shard: [1, 2, 3, 4, 5] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| cache: pnpm | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.pnpm-store | ||
| key: ${{ runner.os }}-pnpm-${{ hashFiles("pnpm-lock.yaml") }} | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm run test --shard=${{ matrix.shard }}/5 | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| cache: pnpm | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.pnpm-store | ||
| key: ${{ runner.os }}-pnpm-${{ hashFiles("pnpm-lock.yaml") }} | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm run lint | ||
| - run: pnpm run sherif | ||
| - name: Check locale JSON freshness | ||
| run: | | ||
| node scripts/generate-locale-json.cjs 2>/dev/null || true | ||
| if ! git diff --exit-code -- '*.json' -- ':(exclude)node_modules/'; then | ||
| echo "::error::Locale JSON files are out of date. Run 'node scripts/generate-locale-json.cjs' and commit the changes." | ||
| exit 1 | ||
| fi | ||
| - name: Check locale placeholder validity | ||
| run: node scripts/check-locale-placeholders.cjs | ||
| - name: Scan for hardcoded locale strings | ||
| run: | | ||
| # Report hardcoded strings but don't fail the build (informational for now) | ||
| node scripts/scan-hardcoded-v2.mjs || true | ||
| typecheck: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v6 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| cache: pnpm | ||
| - uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.pnpm-store | ||
| key: ${{ runner.os }}-pnpm-${{ hashFiles("pnpm-lock.yaml") }} | ||
| - run: pnpm install --frozen-lockfile | ||
| - name: Typecheck | ||
| run: | | ||
| pnpm dlx --package @typescript/native-preview@beta tsgo --version | ||
| for config in packages/*/tsconfig.json; do | ||
| echo "Typechecking ${config}" | ||
| pnpm dlx --package @typescript/native-preview@beta tsgo -p "${config}" --noEmit | ||
| done | ||
| - name: Typecheck VS Code extension | ||
| run: pnpm --filter kimi-code run typecheck | ||
| - name: Typecheck kimi-web (vue-tsc) | ||
| run: pnpm --filter @moonshot-ai/kimi-web run typecheck | ||
| - name: Typecheck vis-server | ||
| run: pnpm --filter @moonshot-ai/vis-server run typecheck | ||
| - name: Typecheck vis-web | ||
| run: pnpm --filter @moonshot-ai/vis-web run typecheck | ||
| native-tools: | ||
| runs-on: windows-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: packages/kimi-native-tools | ||
| - name: Cargo test | ||
| working-directory: packages/kimi-native-tools | ||
| run: cargo test | ||
| - name: Cargo build (release) | ||
| working-directory: packages/kimi-native-tools | ||
| run: cargo build --release | ||
| wire-contract: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Wire contract is up to date | ||
| # Regenerate wire.gen.ts from src/rpc/types.rs; a diff means a Rust | ||
| # wire type changed without the generated file being committed | ||
| # (workflow: 改 Rust → pnpm gen:wire → 提交生成文件). | ||
| run: | | ||
| pnpm gen:wire | ||
| git diff --exit-code -- packages/kimi-agent/src/rpc/wire.gen.ts | ||