Skip to content

feat(kimi-cli): package-manager-aware upgrade hints (codex parity) #34

feat(kimi-cli): package-manager-aware upgrade hints (codex parity)

feat(kimi-cli): package-manager-aware upgrade hints (codex parity) #34

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 29, Col: 16): Unexpected symbol: '"pnpm-lock'. Located at position 11 within expression: hashFiles("pnpm-lock.yaml"), (Line: 67, Col: 16): Unexpected symbol: '"pnpm-lock'. Located at position 11 within expression: hashFiles("pnpm-lock.yaml"), (Line: 88, Col: 16): Unexpected symbol: '"pnpm-lock'. Located at position 11 within expression: hashFiles("pnpm-lock.yaml"), (Line: 123, Col: 16): Unexpected symbol: '"pnpm-lock'. Located at position 11 within expression: hashFiles("pnpm-lock.yaml")
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