fix(kiloclaw): google setup improvements #4105
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Cancel in-progress runs when a new commit is pushed to the same PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| cloud_agent: ${{ steps.filter.outputs.cloud_agent }} | |
| cloud_agent_next: ${{ steps.filter.outputs.cloud_agent_next }} | |
| webhook_agent: ${{ steps.filter.outputs.webhook_agent }} | |
| security_auto_analysis: ${{ steps.filter.outputs.security_auto_analysis }} | |
| kiloclaw: ${{ steps.filter.outputs.kiloclaw }} | |
| app_builder: ${{ steps.filter.outputs.app_builder }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect changes | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| cloud_agent: | |
| - 'cloud-agent/**' | |
| cloud_agent_next: | |
| - 'cloud-agent-next/**' | |
| webhook_agent: | |
| - 'cloudflare-webhook-agent-ingest/**' | |
| security_auto_analysis: | |
| - 'cloudflare-security-auto-analysis/**' | |
| kiloclaw: | |
| - 'kiloclaw/**' | |
| app_builder: | |
| - 'cloudflare-app-builder/**' | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm run lint | |
| format-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Format check | |
| run: | | |
| pnpm run format:check || { | |
| echo "::error::Prettier formatting check failed. Please run 'pnpm run format' locally and commit the changes before pushing." | |
| exit 1 | |
| } | |
| dependency-cycle-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Dependency cycle check | |
| run: pnpm run dependency-cycle-check | |
| test: | |
| runs-on: ubuntu-24.04-8core | |
| services: | |
| postgres: | |
| image: pgvector/pgvector:pg16 | |
| env: | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| NODE_ENV: test | |
| POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/postgres | |
| POSTGRES_CONNECT_TIMEOUT: 30000 | |
| POSTGRES_MAX_QUERY_TIME: 30000 | |
| JEST_MAX_WORKERS: 4 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run tests | |
| run: pnpm run test | |
| build: | |
| runs-on: ubuntu-24.04-8core | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Cache Next.js build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| ${{ github.workspace }}/.next/cache | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
| - name: Setup Vercel ENV | |
| run: | | |
| pnpm install --global vercel@latest | |
| vercel link --project=kilocode-app --token=${{ secrets.VERCEL_TOKEN }} --yes | |
| vercel env pull .env.production.local --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build application | |
| env: | |
| NODE_ENV: production | |
| SENTRY_AUTH_TOKEN: '' | |
| NODE_OPTIONS: '--max-old-space-size=8192' | |
| run: pnpm run build | |
| cloud-agent: | |
| needs: changes | |
| if: needs.changes.outputs.cloud_agent == 'true' | |
| runs-on: ubuntu-24.04-8core | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build wrapper bundle | |
| working-directory: cloud-agent/wrapper | |
| run: bun run build.ts | |
| - name: Typecheck (cloud-agent) | |
| run: pnpm --filter cloud-agent typecheck | |
| - name: Lint (cloud-agent) | |
| run: pnpm --filter cloud-agent lint | |
| - name: Run cloud-agent tests | |
| run: pnpm --filter cloud-agent test:all | |
| cloud-agent-next: | |
| needs: changes | |
| if: needs.changes.outputs.cloud_agent_next == 'true' | |
| runs-on: ubuntu-24.04-8core | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| ref: ${{ github.head_ref }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build wrapper bundle | |
| working-directory: cloud-agent-next/wrapper | |
| run: bun run build.ts | |
| - name: Typecheck (cloud-agent-next) | |
| run: pnpm --filter cloud-agent-next typecheck | |
| - name: Lint (cloud-agent-next) | |
| run: pnpm --filter cloud-agent-next lint | |
| - name: Run cloud-agent-next tests | |
| run: pnpm --filter cloud-agent-next test:all | |
| webhook-agent: | |
| needs: changes | |
| if: needs.changes.outputs.webhook_agent == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck (webhook-agent-ingest) | |
| run: pnpm --filter cloudflare-webhook-agent-ingest typecheck | |
| - name: Lint (webhook-agent-ingest) | |
| run: pnpm --filter cloudflare-webhook-agent-ingest lint | |
| - name: Run webhook-agent-ingest tests | |
| run: pnpm --filter cloudflare-webhook-agent-ingest test | |
| security-auto-analysis: | |
| needs: changes | |
| if: needs.changes.outputs.security_auto_analysis == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck (security-auto-analysis) | |
| run: pnpm --filter cloudflare-security-auto-analysis typecheck | |
| - name: Run security-auto-analysis tests | |
| run: pnpm --filter cloudflare-security-auto-analysis test | |
| kiloclaw: | |
| needs: changes | |
| if: needs.changes.outputs.kiloclaw == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck (kiloclaw) | |
| run: pnpm --filter kiloclaw typecheck | |
| - name: Lint (kiloclaw) | |
| run: pnpm --filter kiloclaw lint | |
| - name: Run kiloclaw tests | |
| run: pnpm --filter kiloclaw test | |
| - name: Typecheck (secret-catalog) | |
| run: pnpm --filter @kilocode/kiloclaw-secret-catalog typecheck | |
| - name: Run secret-catalog tests | |
| run: pnpm --filter @kilocode/kiloclaw-secret-catalog test | |
| app-builder: | |
| needs: changes | |
| if: needs.changes.outputs.app_builder == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck (app-builder) | |
| run: pnpm --filter app-builder typecheck | |
| - name: Run app-builder tests | |
| run: pnpm --filter app-builder test | |
| cloudflare: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: deploy-builder | |
| filter: kilo-deploy-builder | |
| - name: deploy-dispatcher | |
| filter: deploy-dispatcher | |
| - name: code-review | |
| filter: kilo-code-review-worker | |
| name: cloudflare-${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Typecheck | |
| run: pnpm --filter ${{ matrix.filter }} typecheck |