fix(ci): use npm to install opencode-ai CLI instead of install.sh

The @opencode-ai/sdk spawns 'opencode serve' internally, which requires
the actual opencode CLI binary to be installed. Our install.sh only
installs agents/commands/tools, not the CLI.

Changes:
- Install CLI via 'npm install -g opencode-ai' (the real CLI)
- Then install our agents via 'bash install.sh essential'
- Remove unnecessary PATH manipulation (npm -g handles this)
This commit is contained in:
darrenhinde 2025-11-26 22:29:36 +00:00
parent 9cf88812d4
commit e5d640bae6

View file

@ -28,17 +28,19 @@ jobs:
cache: 'npm' cache: 'npm'
cache-dependency-path: 'evals/framework/package-lock.json' cache-dependency-path: 'evals/framework/package-lock.json'
# Install the OpenCode CLI (from opencode.ai, NOT our install.sh)
# Our install.sh only installs agents/commands/tools, not the CLI binary
# The @opencode-ai/sdk spawns `opencode serve` internally, so CLI is required
- name: Install OpenCode CLI - name: Install OpenCode CLI
run: | run: |
bash install.sh npm install -g opencode-ai
echo "$HOME/.opencode/bin" >> $GITHUB_PATH
- name: Verify OpenCode installation
run: |
export PATH="$HOME/.opencode/bin:$PATH"
which opencode which opencode
opencode --version opencode --version
# Install our OpenAgents components (agents, commands, tools)
- name: Install OpenAgents Components
run: bash install.sh essential --install-dir .opencode
- name: Install dependencies - name: Install dependencies
working-directory: evals/framework working-directory: evals/framework
run: npm install run: npm install
@ -48,9 +50,7 @@ jobs:
run: npm run build run: npm run build
- name: Run OpenAgent smoke test - name: Run OpenAgent smoke test
run: | run: npm run test:ci:openagent
export PATH="$HOME/.opencode/bin:$PATH"
npm run test:ci:openagent
env: env:
CI: true CI: true
@ -78,17 +78,19 @@ jobs:
cache: 'npm' cache: 'npm'
cache-dependency-path: 'evals/framework/package-lock.json' cache-dependency-path: 'evals/framework/package-lock.json'
# Install the OpenCode CLI (from opencode.ai, NOT our install.sh)
# Our install.sh only installs agents/commands/tools, not the CLI binary
# The @opencode-ai/sdk spawns `opencode serve` internally, so CLI is required
- name: Install OpenCode CLI - name: Install OpenCode CLI
run: | run: |
bash install.sh npm install -g opencode-ai
echo "$HOME/.opencode/bin" >> $GITHUB_PATH
- name: Verify OpenCode installation
run: |
export PATH="$HOME/.opencode/bin:$PATH"
which opencode which opencode
opencode --version opencode --version
# Install our OpenAgents components (agents, commands, tools)
- name: Install OpenAgents Components
run: bash install.sh essential --install-dir .opencode
- name: Install dependencies - name: Install dependencies
working-directory: evals/framework working-directory: evals/framework
run: npm install run: npm install
@ -98,9 +100,7 @@ jobs:
run: npm run build run: npm run build
- name: Run OpenCoder smoke test - name: Run OpenCoder smoke test
run: | run: npm run test:ci:opencoder
export PATH="$HOME/.opencode/bin:$PATH"
npm run test:ci:opencoder
env: env:
CI: true CI: true