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:
parent
9cf88812d4
commit
e5d640bae6
1 changed files with 18 additions and 18 deletions
36
.github/workflows/test-agents.yml
vendored
36
.github/workflows/test-agents.yml
vendored
|
|
@ -28,17 +28,19 @@ jobs:
|
|||
cache: 'npm'
|
||||
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
|
||||
run: |
|
||||
bash install.sh
|
||||
echo "$HOME/.opencode/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Verify OpenCode installation
|
||||
run: |
|
||||
export PATH="$HOME/.opencode/bin:$PATH"
|
||||
npm install -g opencode-ai
|
||||
which opencode
|
||||
opencode --version
|
||||
|
||||
# Install our OpenAgents components (agents, commands, tools)
|
||||
- name: Install OpenAgents Components
|
||||
run: bash install.sh essential --install-dir .opencode
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: evals/framework
|
||||
run: npm install
|
||||
|
|
@ -48,9 +50,7 @@ jobs:
|
|||
run: npm run build
|
||||
|
||||
- name: Run OpenAgent smoke test
|
||||
run: |
|
||||
export PATH="$HOME/.opencode/bin:$PATH"
|
||||
npm run test:ci:openagent
|
||||
run: npm run test:ci:openagent
|
||||
env:
|
||||
CI: true
|
||||
|
||||
|
|
@ -78,17 +78,19 @@ jobs:
|
|||
cache: 'npm'
|
||||
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
|
||||
run: |
|
||||
bash install.sh
|
||||
echo "$HOME/.opencode/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Verify OpenCode installation
|
||||
run: |
|
||||
export PATH="$HOME/.opencode/bin:$PATH"
|
||||
npm install -g opencode-ai
|
||||
which opencode
|
||||
opencode --version
|
||||
|
||||
# Install our OpenAgents components (agents, commands, tools)
|
||||
- name: Install OpenAgents Components
|
||||
run: bash install.sh essential --install-dir .opencode
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: evals/framework
|
||||
run: npm install
|
||||
|
|
@ -98,9 +100,7 @@ jobs:
|
|||
run: npm run build
|
||||
|
||||
- name: Run OpenCoder smoke test
|
||||
run: |
|
||||
export PATH="$HOME/.opencode/bin:$PATH"
|
||||
npm run test:ci:opencoder
|
||||
run: npm run test:ci:opencoder
|
||||
env:
|
||||
CI: true
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue