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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event.inputs.branch || github.ref }} fetch-depth: 0 - name: Check for code changes uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event.inputs.branch || github.ref }} - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 - name: Install Dependencies run: | sudo apt update -y sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev - name: Build Binary for Smoke Tests run: | cargo build --bin goose - name: Upload goose binary uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: goose-binary path: target/debug/goose retention-days: 1 smoke-tests: name: Smoke Tests runs-on: ubuntu-latest needs: build-binary steps: - name: Checkout Code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 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@v7 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@v7 with: python-version: '3.12' - name: Install uv uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 - 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 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@v7 with: python-version: '3.12' - name: Install uv uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 - 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