dummy-agent-test.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Workflow that uses the DummyAgent to run a simple task
  2. name: Run E2E test with dummy agent
  3. # Always run on "main"
  4. # Always run on PRs
  5. on:
  6. push:
  7. branches:
  8. - main
  9. pull_request:
  10. # If triggered by a PR, it will be in the same group. However, each commit on main will be in its own unique group
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
  13. cancel-in-progress: true
  14. jobs:
  15. test:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@v4
  19. - name: Free Disk Space (Ubuntu)
  20. uses: jlumbroso/free-disk-space@main
  21. with:
  22. # this might remove tools that are actually needed,
  23. # if set to "true" but frees about 6 GB
  24. tool-cache: true
  25. # all of these default to true, but feel free to set to
  26. # "false" if necessary for your workflow
  27. android: true
  28. dotnet: true
  29. haskell: true
  30. large-packages: true
  31. docker-images: false
  32. swap-storage: true
  33. - name: Set up Docker Buildx
  34. id: buildx
  35. uses: docker/setup-buildx-action@v3
  36. - name: Install poetry via pipx
  37. run: pipx install poetry
  38. - name: Set up Python
  39. uses: actions/setup-python@v5
  40. with:
  41. python-version: '3.12'
  42. cache: 'poetry'
  43. - name: Install Python dependencies using Poetry
  44. run: poetry install --without evaluation,llama-index
  45. - name: Build Environment
  46. run: make build
  47. - name: Run tests
  48. run: |
  49. set -e
  50. SANDBOX_FORCE_REBUILD_RUNTIME=True poetry run python3 openhands/core/main.py -t "do a flip" -d ./workspace/ -c DummyAgent
  51. - name: Check exit code
  52. run: |
  53. if [ $? -ne 0 ]; then
  54. echo "Test failed"
  55. exit 1
  56. else
  57. echo "Test passed"
  58. fi