e2b-e2e.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: E2E (E2B sandbox)
  2. # This suite provisions external E2B sandboxes and is intentionally opt-in.
  3. # It has no push, pull_request, schedule, or workflow_call trigger.
  4. on:
  5. workflow_dispatch:
  6. permissions:
  7. contents: read
  8. env:
  9. DSH_CLIENT_BRAND: official
  10. # CI runs must never report to the production telemetry endpoint baked
  11. # into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
  12. DSH_TELEMETRY_DISABLED: '1'
  13. jobs:
  14. e2b:
  15. runs-on: ubuntu-latest
  16. name: E2B live Loader composition
  17. timeout-minutes: 30
  18. steps:
  19. - uses: actions/checkout@v6
  20. - uses: pnpm/action-setup@v4
  21. - uses: actions/setup-node@v6
  22. with:
  23. node-version: 24
  24. cache: pnpm
  25. - name: Install (immutable)
  26. run: pnpm install --frozen-lockfile
  27. # The tests self-skip locally when the credential is absent. A manually
  28. # dispatched run must fail instead of reporting an all-skipped green.
  29. - name: Preflight (require E2B API key)
  30. env:
  31. E2B_API_KEY: ${{ secrets.E2B_API_KEY_EXTERNAL }}
  32. run: |
  33. set -euo pipefail
  34. if [ -z "${E2B_API_KEY:-}" ]; then
  35. echo "::error::E2B_API_KEY is empty. Configure the E2B_API_KEY_EXTERNAL repository secret."
  36. exit 1
  37. fi
  38. echo "E2B_API_KEY present."
  39. # The Loader smoke runs package exports under plain Node in lib mode.
  40. - name: Build (lib for the E2B Loader smoke)
  41. run: pnpm run build
  42. - name: E2B tests (live sandbox)
  43. env:
  44. E2B_API_KEY: ${{ secrets.E2B_API_KEY_EXTERNAL }}
  45. DSH_E2E_MAX_WORKERS: '1'
  46. DSH_EXAMPLE_MODE: lib
  47. run: >-
  48. pnpm exec vitest run --config vitest.e2e.config.ts
  49. packages/e2b/e2b/tests/composition.e2e.ts