mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Two regressions from the previous CI install: - Installing opencode-ai globally in server-ci/server-tests caused opencode-agent.test.ts (gated on \`hasOpenCode\`) to start running for the first time and surface real but unrelated test breakage. Trim the install to claude-code, which is all that's needed for the Claude e2e tests that motivated the change. - claude-agent.integration.test.ts's supportedModels test calls the SDK's \`query()\` directly (bypassing ClaudeAgentClient) and didn't pass \`pathToClaudeCodeExecutable\`. The 0.2.71 SDK had a bundled cli.js fallback; 0.2.133 doesn't, so on Ubuntu CI it tries the per-platform binary path (\`...claude-agent-sdk-linux-x64-musl/claude\`) which isn't installed via the \`claude-code\` global. Resolve the binary explicitly in the test and pass it as the SDK option.
251 lines
6.1 KiB
YAML
251 lines
6.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Check formatting
|
|
run: npx oxfmt --check .
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
typecheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build highlight dependency
|
|
run: npm run build --workspace=@getpaseo/highlight
|
|
|
|
- name: Build relay dependency
|
|
run: npm run build --workspace=@getpaseo/relay
|
|
|
|
- name: Build server dependency
|
|
run: npm run build --workspace=@getpaseo/server
|
|
|
|
- name: Typecheck all packages
|
|
run: npm run typecheck
|
|
|
|
server-tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
name: server-tests (${{ matrix.os }})
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Fetch origin/main (worktree tests)
|
|
run: git fetch --no-tags origin main:refs/remotes/origin/main
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Install Claude Code CLI for provider tests
|
|
run: npm install -g @anthropic-ai/claude-code
|
|
|
|
- name: Build highlight dependency
|
|
run: npm run build --workspace=@getpaseo/highlight
|
|
|
|
- name: Build relay dependency
|
|
run: npm run build --workspace=@getpaseo/relay
|
|
|
|
- name: Run server tests
|
|
run: npm run test --workspace=@getpaseo/server
|
|
env:
|
|
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
|
|
desktop-tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build highlight dependency
|
|
run: npm run build --workspace=@getpaseo/highlight
|
|
|
|
- name: Build relay dependency
|
|
run: npm run build --workspace=@getpaseo/relay
|
|
|
|
- name: Build server dependency
|
|
run: npm run build --workspace=@getpaseo/server
|
|
|
|
- name: Run desktop tests
|
|
run: npm run test --workspace=@getpaseo/desktop
|
|
|
|
app-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Install Playwright browsers
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: Build highlight dependency
|
|
run: npm run build --workspace=@getpaseo/highlight
|
|
|
|
- name: Run app unit tests
|
|
run: npm run test --workspace=@getpaseo/app
|
|
|
|
playwright:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Install Playwright browsers
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: Build highlight dependency
|
|
run: npm run build --workspace=@getpaseo/highlight
|
|
|
|
- name: Build relay dependency
|
|
run: npm run build --workspace=@getpaseo/relay
|
|
|
|
- name: Build server dependency
|
|
run: npm run build --workspace=@getpaseo/server
|
|
|
|
- name: Install agent CLIs for provider tests
|
|
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai
|
|
|
|
- name: Run Playwright E2E tests
|
|
run: npm run test:e2e --workspace=@getpaseo/app
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
|
|
- name: Upload test artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: failure()
|
|
with:
|
|
name: playwright-results
|
|
path: |
|
|
packages/app/test-results/
|
|
packages/app/playwright-report/
|
|
retention-days: 7
|
|
|
|
relay-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build relay
|
|
run: npm run build --workspace=@getpaseo/relay
|
|
|
|
- name: Run relay tests
|
|
run: npm run test --workspace=@getpaseo/relay
|
|
|
|
cli-tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [1, 2, 3]
|
|
runs-on: ubuntu-latest
|
|
name: cli-tests (shard ${{ matrix.shard }}/3)
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Install agent CLIs for provider tests
|
|
run: npm install -g @anthropic-ai/claude-code @openai/codex@0.105.0 opencode-ai
|
|
|
|
- name: Build highlight dependency
|
|
run: npm run build --workspace=@getpaseo/highlight
|
|
|
|
- name: Run CLI tests
|
|
run: npm run test --workspace=@getpaseo/cli
|
|
env:
|
|
PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD: "0"
|
|
PASEO_DICTATION_ENABLED: "0"
|
|
PASEO_VOICE_MODE_ENABLED: "0"
|
|
PASEO_CLI_TEST_SHARD: ${{ matrix.shard }}
|
|
PASEO_CLI_TEST_SHARD_TOTAL: "3"
|