dummy-agent-test.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. jobs:
  11. test:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v4
  15. - name: Free Disk Space (Ubuntu)
  16. uses: jlumbroso/free-disk-space@main
  17. with:
  18. # this might remove tools that are actually needed,
  19. # if set to "true" but frees about 6 GB
  20. tool-cache: true
  21. # all of these default to true, but feel free to set to
  22. # "false" if necessary for your workflow
  23. android: true
  24. dotnet: true
  25. haskell: true
  26. large-packages: true
  27. docker-images: false
  28. swap-storage: true
  29. - name: Set up Docker Buildx
  30. id: buildx
  31. uses: docker/setup-buildx-action@v3
  32. - name: Install poetry via pipx
  33. run: pipx install poetry
  34. - name: Set up Python
  35. uses: actions/setup-python@v5
  36. with:
  37. python-version: '3.12'
  38. cache: 'poetry'
  39. - name: Install Python dependencies using Poetry
  40. run: poetry install --without evaluation,llama-index
  41. - name: Build Environment
  42. run: make build
  43. - name: Run tests
  44. run: |
  45. set -e
  46. SANDBOX_FORCE_REBUILD_RUNTIME=True poetry run python3 openhands/core/main.py -t "do a flip" -d ./workspace/ -c DummyAgent
  47. - name: Check exit code
  48. run: |
  49. if [ $? -ne 0 ]; then
  50. echo "Test failed"
  51. exit 1
  52. else
  53. echo "Test passed"
  54. fi