E2E 測試:進階 Agent Prompt (Advanced E2E) #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E 測試:進階 Agent Prompt (Advanced E2E) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| image: | |
| description: | | |
| Image name (matches tests/e2e/agents/<name>.yaml). | |
| required: true | |
| type: choice | |
| options: | |
| - py-devkit-image-base | |
| tag: | |
| description: | | |
| Image tag to test (default: latest). | |
| required: false | |
| default: latest | |
| agent: | |
| description: | | |
| Agent name to test. | |
| required: true | |
| type: choice | |
| options: | |
| - opencode | |
| - copilot | |
| - gemini | |
| - lark-cli | |
| - trae-cli | |
| prompt: | |
| description: | | |
| Custom prompt to send to the agent. | |
| required: false | |
| default: "Say hello and introduce yourself briefly." | |
| timeout: | |
| description: | | |
| Maximum wait time in seconds for the agent to respond. | |
| required: false | |
| default: 120 | |
| model: | |
| description: | | |
| LLM model (only for trae-cli). Only :free models listed (no OpenRouter credits needed). | |
| Select "default" to use image config. | |
| required: false | |
| type: choice | |
| default: default | |
| options: | |
| - default | |
| - google/gemma-4-26b-a4b-it:free | |
| - google/gemma-4-31b-it:free | |
| - nvidia/nemotron-3-nano-30b-a3b:free | |
| - nvidia/nemotron-3-super-120b-a12b:free | |
| - nvidia/nemotron-3-ultra-550b-a55b:free | |
| - cohere/north-mini-code:free | |
| - inclusionai/ling-3.0-flash:free | |
| - openai/gpt-oss-20b:free | |
| - poolside/laguna-m.1:free | |
| opencode_api_key: | |
| description: | | |
| OPENCODE_API_KEY (for opencode agent) | |
| required: false | |
| copilot_token: | |
| description: | | |
| COPILOT_GITHUB_TOKEN (for copilot agent) | |
| required: false | |
| gemini_api_key: | |
| description: | | |
| GEMINI_API_KEY (for gemini agent) | |
| required: false | |
| openai_api_key: | |
| description: | | |
| OPENAI_API_KEY (for trae-cli agent) | |
| required: false | |
| anthropic_api_key: | |
| description: | | |
| ANTHROPIC_API_KEY (for trae-cli agent) | |
| required: false | |
| openrouter_api_key: | |
| description: | | |
| OPENROUTER_API_KEY (for trae-cli agent) | |
| required: false | |
| doubao_api_key: | |
| description: | | |
| DOUBAO_API_KEY (for trae-cli via 豆包) | |
| required: false | |
| env: | |
| REGISTRY: ghcr.io | |
| ORG: shumingyang-opencode | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install pyyaml pytest | |
| - name: Run advanced E2E tests | |
| env: | |
| OPENCODE_API_KEY: ${{ inputs.opencode_api_key }} | |
| COPILOT_GITHUB_TOKEN: ${{ inputs.copilot_token }} | |
| GEMINI_API_KEY: ${{ inputs.gemini_api_key }} | |
| OPENAI_API_KEY: ${{ inputs.openai_api_key || inputs.openrouter_api_key }} | |
| ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }} | |
| OPENROUTER_API_KEY: ${{ inputs.openrouter_api_key }} | |
| DOUBAO_API_KEY: ${{ inputs.doubao_api_key }} | |
| run: | | |
| pytest tests/e2e/test_advanced.py \ | |
| --image ${{ inputs.image }} \ | |
| --tag ${{ inputs.tag }} \ | |
| --agent ${{ inputs.agent }} \ | |
| --prompt "${{ inputs.prompt }}" \ | |
| --timeout ${{ inputs.timeout }} \ | |
| --model ${{ inputs.model }} \ | |
| -v --tb=short -s |