on: pull_request: branches: - main push: branches: - main workflow_dispatch: inputs: branch: description: "Branch to test" required: true default: "main" type: string name: Live Provider Tests jobs: check-fork: runs-on: ubuntu-latest # Skip entire workflow for fork PRs and dependabot PRs (they don't have access to secrets) if: github.actor != 'dependabot[bot]' && (github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) steps: - run: echo "Not a fork PR - proceeding with smoke tests" changes: runs-on: ubuntu-latest needs: check-fork outputs: code: ${{ steps.filter.outputs.code }} steps: - name: Checkout Code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.inputs.branch || github.ref }} fetch-depth: 0 - name: Check for code changes uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # pin@v3 id: filter with: base: ${{ github.event.before || github.event.pull_request.base.sha }} filters: | code: - '!documentation/**' build-binary: name: Build Binary runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.code == 'true' || github.event_name == 'workflow_dispatch' steps: - name: Checkout Code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.inputs.branch || github.ref }} - uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1 - name: Install Dependencies run: | sudo apt update -y sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev - name: Cache Rust dependencies uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - name: Build Binary for Smoke Tests run: | cargo build --bin goose --bin goosed - name: Upload goose binary uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: goose-binary path: target/debug/goose retention-days: 1 - name: Upload goosed binary uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: goosed-binary path: target/debug/goosed retention-days: 1 smoke-tests: name: Smoke Tests runs-on: ubuntu-latest needs: build-binary steps: - name: Checkout Code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.inputs.branch || github.ref }} - name: Download Binary uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: goose-binary path: target/debug - name: Make Binary Executable run: chmod +x target/debug/goose - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '22' - name: Install agentic providers run: npm install -g @anthropic-ai/claude-code @zed-industries/claude-agent-acp @zed-industries/codex-acp - name: Install Node.js Dependencies run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile working-directory: ui/desktop - name: Run Smoke Tests (Normal Mode) env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} CODEX_API_KEY: ${{ secrets.OPENAI_API_KEY }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} GEMINI_API_KEY: ${{ secrets.GOOGLE_API_KEY }} DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} XAI_API_KEY: ${{ secrets.XAI_API_KEY }} TETRATE_API_KEY: ${{ secrets.TETRATE_API_KEY }} HOME: /tmp/goose-home GOOSE_DISABLE_KEYRING: 1 SKIP_BUILD: 1 SKIP_PROVIDERS: ${{ vars.SKIP_PROVIDERS || '' }} run: | mkdir -p $HOME/.local/share/goose/sessions mkdir -p $HOME/.config/goose source ../../bin/activate-hermit && pnpm run test:integration:providers working-directory: ui/desktop - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.12' - name: Install uv uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 - name: Run MCP Tests env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} TETRATE_API_KEY: ${{ secrets.TETRATE_API_KEY }} XAI_API_KEY: ${{ secrets.XAI_API_KEY }} HOME: /tmp/goose-home GOOSE_DISABLE_KEYRING: 1 SKIP_BUILD: 1 run: | bash scripts/test_mcp.sh - name: Run Subrecipe Tests env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GOOSE_PROVIDER: anthropic GOOSE_MODEL: claude-sonnet-4-5-20250929 HOME: /tmp/goose-home GOOSE_DISABLE_KEYRING: 1 SKIP_BUILD: 1 run: | bash scripts/test_subrecipes.sh smoke-tests-code-exec: name: Smoke Tests (Code Execution) runs-on: ubuntu-latest needs: build-binary steps: - name: Checkout Code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.inputs.branch || github.ref }} - name: Download Binary uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: goose-binary path: target/debug - name: Make Binary Executable run: chmod +x target/debug/goose - name: Install Node.js Dependencies run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile working-directory: ui/desktop - name: Run Provider Tests (Code Execution Mode) env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} XAI_API_KEY: ${{ secrets.XAI_API_KEY }} TETRATE_API_KEY: ${{ secrets.TETRATE_API_KEY }} HOME: /tmp/goose-home GOOSE_DISABLE_KEYRING: 1 SKIP_BUILD: 1 SKIP_PROVIDERS: ${{ vars.SKIP_PROVIDERS || '' }} run: | mkdir -p $HOME/.local/share/goose/sessions mkdir -p $HOME/.config/goose source ../../bin/activate-hermit && pnpm run test:integration:providers-code-exec working-directory: ui/desktop compaction-tests: name: Compaction Tests runs-on: ubuntu-latest needs: build-binary steps: - name: Checkout Code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.inputs.branch || github.ref }} - name: Download Binary uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: goose-binary path: target/debug - name: Make Binary Executable run: chmod +x target/debug/goose - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.12' - name: Install uv uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0 - name: Run Compaction Tests env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GOOSE_PROVIDER: anthropic GOOSE_MODEL: claude-sonnet-4-5-20250929 HOME: /tmp/goose-home GOOSE_DISABLE_KEYRING: 1 SKIP_BUILD: 1 run: | mkdir -p $HOME/.local/share/goose/sessions mkdir -p $HOME/.config/goose bash scripts/test_compaction.sh goosed-integration-tests: name: goose server HTTP integration tests runs-on: ubuntu-latest needs: build-binary steps: - name: Checkout Code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ github.event.inputs.branch || github.ref }} - name: Download Binary uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: goosed-binary path: target/debug - name: Make Binary Executable run: chmod +x target/debug/goosed - name: Install Node.js Dependencies run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile working-directory: ui/desktop - name: Run Integration Tests env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GOOSED_BINARY: ../../target/debug/goosed GOOSE_PROVIDER: anthropic GOOSE_MODEL: claude-sonnet-4-5-20250929 SHELL: /bin/bash SKIP_BUILD: 1 run: | echo 'export PATH=/some/fake/path:$PATH' >> $HOME/.bash_profile source ../../bin/activate-hermit && pnpm run test:integration:goosed working-directory: ui/desktop