name: CI 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 - run: pnpm install --frozen-lockfile - run: pnpm run build - name: Smoke test CLI bundle run: pnpm -C apps/kimi-code run smoke test: 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 - run: pnpm install --frozen-lockfile - run: pnpm run test # pi-tui's suite runs on node:test (not vitest), so the root `pnpm run test` # does not execute it; it needs its own job. test-pi-tui: 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 - run: pnpm install --frozen-lockfile - run: pnpm --filter @moonshot-ai/pi-tui test test-windows: runs-on: windows-latest # Temporarily disabled while Windows tests are being stabilized. if: false steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v6 - uses: actions/setup-node@v6 with: node-version-file: .nvmrc cache: pnpm - run: pnpm install --frozen-lockfile # Windows runners are slower and run the whole suite (including # in-process e2e tests) under more contention, so the default 5s test # timeout causes flaky failures. Give it more headroom. - run: pnpm run test -- --testTimeout=30000 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 - run: pnpm install --frozen-lockfile - run: pnpm run lint - run: pnpm run sherif 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 - run: pnpm install --frozen-lockfile - name: Typecheck run: | pnpm dlx --package @typescript/native-preview@beta tsgo --version for config in packages/*/tsconfig.json apps/kimi-code/tsconfig.json; do echo "Typechecking ${config}" pnpm dlx --package @typescript/native-preview@beta tsgo -p "${config}" --noEmit done - 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