mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
* Add integration test framework with mock llm * Fix MonologueAgent and PlannerAgent tests * Remove adhoc logging * Use existing logs * Fix SWEAgent and PlannerAgent * Check-in test log files * conftest: look up under test name folder only * Add docstring to conftest * Finish dev doc * Avoid non-determinism * Remove dependency on llm embedding model * Init embedding model only for MonologueAgent * Add adhoc fix for sandbox discrepancy * Test ssh and exec sandboxes * CI: fix missing sandbox type * conftest: Remove hack * Reword comment for TODO
71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
name: Run Integration Tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
on-linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: SWEAgent-py311-ssh
|
|
python-version: "3.11"
|
|
agent: "SWEAgent"
|
|
embedding-model: "none"
|
|
sandbox: "ssh"
|
|
- name: PlannerAgent-py311-ssh
|
|
python-version: "3.11"
|
|
agent: "PlannerAgent"
|
|
embedding-model: "none"
|
|
sandbox: "ssh"
|
|
- name: MonologueAgent-py311-ssh
|
|
python-version: "3.11"
|
|
agent: "MonologueAgent"
|
|
embedding-model: "local"
|
|
sandbox: "ssh"
|
|
- name: CodeActAgent-py311-ssh
|
|
python-version: "3.11"
|
|
agent: "CodeActAgent"
|
|
embedding-model: "none"
|
|
sandbox: "ssh"
|
|
- name: SWEAgent-py311-exec
|
|
python-version: "3.11"
|
|
agent: "SWEAgent"
|
|
embedding-model: "none"
|
|
sandbox: "exec"
|
|
- name: PlannerAgent-py311-exec
|
|
python-version: "3.11"
|
|
agent: "PlannerAgent"
|
|
embedding-model: "none"
|
|
sandbox: "exec"
|
|
- name: MonologueAgent-py311-exec
|
|
python-version: "3.11"
|
|
agent: "MonologueAgent"
|
|
embedding-model: "local"
|
|
sandbox: "exec"
|
|
- name: CodeActAgent-py311-exec
|
|
python-version: "3.11"
|
|
agent: "CodeActAgent"
|
|
embedding-model: "none"
|
|
sandbox: "exec"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install Poetry
|
|
run: curl -sSL https://install.python-poetry.org | python3 -
|
|
- name: Build Environment
|
|
run: make build
|
|
- name: Run Integration Tests
|
|
env:
|
|
SANDBOX_TYPE: ${{ matrix.sandbox }}
|
|
AGENT: ${{ matrix.agent }}
|
|
MAX_ITERATIONS: 10
|
|
LLM_EMBEDDING_MODEL: ${{ matrix.embedding-model }}
|
|
run: |
|
|
rm -rf workspace
|
|
mkdir workspace
|
|
WORKSPACE_BASE="$GITHUB_WORKSPACE/workspace" WORKSPACE_MOUNT_PATH="$GITHUB_WORKSPACE/workspace" poetry run pytest -s ./tests/integration
|