From e5d640bae6e6deb298e5ea6b751b33156a03ec4e Mon Sep 17 00:00:00 2001 From: darrenhinde <107584450+darrenhinde@users.noreply.github.com> Date: Wed, 26 Nov 2025 22:29:36 +0000 Subject: [PATCH] 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) --- .github/workflows/test-agents.yml | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test-agents.yml b/.github/workflows/test-agents.yml index 86bfe54..c52c4a4 100644 --- a/.github/workflows/test-agents.yml +++ b/.github/workflows/test-agents.yml @@ -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