diff --git a/.github/workflows/code_interpreter_js_tests.yml b/.github/workflows/code_interpreter_js_tests.yml index c6386fafe3..00154d1010 100644 --- a/.github/workflows/code_interpreter_js_tests.yml +++ b/.github/workflows/code_interpreter_js_tests.yml @@ -7,15 +7,6 @@ on: required: false type: string default: '' - run_recovery_tests: - required: false - type: boolean - default: true - node-only: - description: 'Run only the Node leg (skip Bun, Deno and Cloudflare)' - required: false - type: boolean - default: false secrets: E2B_API_KEY: required: true @@ -35,15 +26,8 @@ jobs: # Each runtime keeps one live-test worker. This matrix has four legs, so # it naturally stays below the shared six-job cap. max-parallel: 6 - # With node-only (set by staging callers) the matrix collapses to the - # Node leg: the other legs re-run the suite the Node leg already covers - # and add sandbox load without extra backend signal, so the other - # runtimes are exercised against production only. matrix: - runtime: >- - ${{ inputs.node-only - && fromJSON('["node"]') - || fromJSON('["node", "bun", "deno", "cloudflare"]') }} + runtime: [node, bun, deno, cloudflare] runs-on: ubuntu-22.04 steps: - name: Checkout repository @@ -95,8 +79,6 @@ jobs: with: deno-version: 'v${{ env.TOOL_VERSION_DENO }}' - # The interrupt suite exercises sandbox recovery paths that staging - # cannot serve, so callers can opt out of it. - name: Run test suite under ${{ matrix.runtime }} run: | case "${{ matrix.runtime }}" in @@ -104,11 +86,7 @@ jobs: cloudflare) script=test:cf ;; *) script=test:${{ matrix.runtime }} ;; esac - if [[ "${{ inputs.run_recovery_tests }}" == "true" ]]; then - pnpm "$script" - else - pnpm "$script" --exclude tests/interrupt.test.ts - fi + pnpm "$script" env: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }} diff --git a/.github/workflows/code_interpreter_python_tests.yml b/.github/workflows/code_interpreter_python_tests.yml index 759a01dae4..420edae555 100644 --- a/.github/workflows/code_interpreter_python_tests.yml +++ b/.github/workflows/code_interpreter_python_tests.yml @@ -7,10 +7,6 @@ on: required: false type: string default: '' - run_recovery_tests: - required: false - type: boolean - default: true secrets: E2B_API_KEY: required: true @@ -51,14 +47,7 @@ jobs: run: uv build - name: Run tests - run: | - if [[ "${{ inputs.run_recovery_tests }}" == "true" ]]; then - uv run pytest --verbose --numprocesses=1 - else - uv run pytest --verbose --numprocesses=1 \ - --ignore=tests/async/test_async_interrupt.py \ - --ignore=tests/sync/test_interrupt.py - fi + run: uv run pytest --verbose --numprocesses=1 env: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }} diff --git a/.github/workflows/desktop_js_tests.yml b/.github/workflows/desktop_js_tests.yml index 565a590a96..49c407591d 100644 --- a/.github/workflows/desktop_js_tests.yml +++ b/.github/workflows/desktop_js_tests.yml @@ -7,10 +7,6 @@ on: required: false type: string default: '' - run_tests: - required: false - type: boolean - default: true secrets: E2B_API_KEY: required: true @@ -24,19 +20,14 @@ jobs: run: working-directory: ./packages/desktop-js shell: bash - name: Desktop JS SDK - ${{ inputs.run_tests && matrix.runtime || 'build' }} + name: Desktop JS SDK - ${{ matrix.runtime }} strategy: fail-fast: false # Each runtime keeps one live-test worker. This matrix has four legs, so # it naturally stays below the shared six-job cap. max-parallel: 6 - # Callers that only build (staging) collapse the matrix to a single job; - # the runtime legs are exercised against production. matrix: - runtime: >- - ${{ inputs.run_tests - && fromJSON('["node", "bun", "deno", "cloudflare"]') - || fromJSON('["node"]') }} + runtime: [node, bun, deno, cloudflare] runs-on: ubuntu-22.04 steps: - name: Checkout repository @@ -77,13 +68,13 @@ jobs: run: pnpm build - name: Install Bun - if: inputs.run_tests && matrix.runtime == 'bun' + if: matrix.runtime == 'bun' uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: '${{ env.TOOL_VERSION_BUN }}' - name: Install Deno - if: inputs.run_tests && matrix.runtime == 'deno' + if: matrix.runtime == 'deno' uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 with: deno-version: 'v${{ env.TOOL_VERSION_DENO }}' @@ -91,7 +82,6 @@ jobs: # Every leg runs the same suite; the cloudflare one inside workerd # (vitest-pool-workers). - name: Run test suite under ${{ matrix.runtime }} - if: inputs.run_tests run: | case "${{ matrix.runtime }}" in node) script=test ;; diff --git a/.github/workflows/desktop_python_tests.yml b/.github/workflows/desktop_python_tests.yml index 8861c728da..871d472e24 100644 --- a/.github/workflows/desktop_python_tests.yml +++ b/.github/workflows/desktop_python_tests.yml @@ -7,10 +7,6 @@ on: required: false type: string default: '' - run_tests: - required: false - type: boolean - default: true secrets: E2B_API_KEY: required: true @@ -51,7 +47,6 @@ jobs: run: uv build - name: Run tests - if: inputs.run_tests run: uv run pytest --verbose --numprocesses=4 env: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} diff --git a/.github/workflows/js_sdk_tests.yml b/.github/workflows/js_sdk_tests.yml index ff2d685f76..72c12ddd3f 100644 --- a/.github/workflows/js_sdk_tests.yml +++ b/.github/workflows/js_sdk_tests.yml @@ -7,11 +7,6 @@ on: required: false type: string default: '' - node-only: - description: 'Run only the Node legs (skip Bun, Deno, Cloudflare, and the browser)' - required: false - type: boolean - default: false secrets: E2B_API_KEY: required: true @@ -32,18 +27,22 @@ jobs: # can run together without restoring Vitest's default worker # multiplication. max-parallel: 7 - # With node-only (set by staging callers) the matrix collapses to the - # Node legs: the Bun/Deno/Cloudflare/browser legs re-run suites the Node - # legs already cover and add sandbox/build load, so the other runtimes - # are exercised against production only. Note this does drop backend - # signal for the browser leg specifically — it's the only one that - # depends on the API's CORS headers — so a staging-only CORS regression - # surfaces on the production run rather than before merge. matrix: - include: >- - ${{ inputs.node-only - && fromJSON('[{"runtime": "node", "os": "ubuntu-22.04"}, {"runtime": "node", "os": "windows-latest"}]') - || fromJSON('[{"runtime": "node", "os": "ubuntu-22.04"}, {"runtime": "node", "os": "windows-latest"}, {"runtime": "bun", "os": "ubuntu-22.04"}, {"runtime": "deno", "os": "ubuntu-22.04"}, {"runtime": "cloudflare", "os": "ubuntu-22.04"}, {"runtime": "cloudflare-deploy", "os": "ubuntu-22.04"}, {"runtime": "browser", "os": "ubuntu-22.04"}]') }} + include: + - runtime: node + os: ubuntu-22.04 + - runtime: node + os: windows-latest + - runtime: bun + os: ubuntu-22.04 + - runtime: deno + os: ubuntu-22.04 + - runtime: cloudflare + os: ubuntu-22.04 + - runtime: cloudflare-deploy + os: ubuntu-22.04 + - runtime: browser + os: ubuntu-22.04 runs-on: ${{ matrix.os }} env: E2B_TEST_MAX_WORKERS: 1 diff --git a/.github/workflows/sdk_tests.yml b/.github/workflows/sdk_tests.yml index 4aeaea69a1..a99a9ba5b1 100644 --- a/.github/workflows/sdk_tests.yml +++ b/.github/workflows/sdk_tests.yml @@ -113,7 +113,7 @@ jobs: - 'packages/dockerfile-utils-python/**/!(*.md)' js-tests: - name: Production / JS SDK Tests + name: JS SDK Tests needs: changes if: ${{ needs.changes.outputs.js == 'true' || github.event_name == 'workflow_dispatch' }} uses: ./.github/workflows/js_sdk_tests.yml @@ -121,7 +121,7 @@ jobs: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} python-tests: - name: Production / Python SDK Tests + name: Python SDK Tests needs: changes if: ${{ needs.changes.outputs.python == 'true' || github.event_name == 'workflow_dispatch' }} uses: ./.github/workflows/python_sdk_tests.yml @@ -129,7 +129,7 @@ jobs: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} cli-tests: - name: Production / CLI Tests + name: CLI Tests needs: changes if: ${{ needs.changes.outputs.cli == 'true' || github.event_name == 'workflow_dispatch' }} uses: ./.github/workflows/cli_tests.yml @@ -137,7 +137,7 @@ jobs: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} code-interpreter-js-tests: - name: Production / Code Interpreter JS SDK Tests + name: Code Interpreter JS SDK Tests needs: changes if: ${{ needs.changes.outputs.code_interpreter_js == 'true' || github.event_name == 'workflow_dispatch' }} uses: ./.github/workflows/code_interpreter_js_tests.yml @@ -145,7 +145,7 @@ jobs: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} code-interpreter-python-tests: - name: Production / Code Interpreter Python SDK Tests + name: Code Interpreter Python SDK Tests needs: changes if: ${{ needs.changes.outputs.code_interpreter_python == 'true' || github.event_name == 'workflow_dispatch' }} uses: ./.github/workflows/code_interpreter_python_tests.yml @@ -153,7 +153,7 @@ jobs: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} desktop-js-tests: - name: Production / Desktop JS SDK Tests + name: Desktop JS SDK Tests needs: changes if: ${{ needs.changes.outputs.desktop_js == 'true' || github.event_name == 'workflow_dispatch' }} uses: ./.github/workflows/desktop_js_tests.yml @@ -161,93 +161,13 @@ jobs: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} desktop-python-tests: - name: Production / Desktop Python SDK Tests + name: Desktop Python SDK Tests needs: changes if: ${{ needs.changes.outputs.desktop_python == 'true' || github.event_name == 'workflow_dispatch' }} uses: ./.github/workflows/desktop_python_tests.yml secrets: E2B_API_KEY: ${{ secrets.E2B_API_KEY }} - js-tests-staging: - name: Staging / JS SDK Tests - needs: changes - if: ${{ needs.changes.outputs.js == 'true' || github.event_name == 'workflow_dispatch' }} - uses: ./.github/workflows/js_sdk_tests.yml - with: - E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }} - # Staging only checks backend compatibility, so the Node legs suffice; - # Bun/Deno/Cloudflare runtime coverage runs against production above. - node-only: true - secrets: - E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }} - - python-tests-staging: - name: Staging / Python SDK Tests - needs: changes - if: ${{ needs.changes.outputs.python == 'true' || github.event_name == 'workflow_dispatch' }} - uses: ./.github/workflows/python_sdk_tests.yml - with: - E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }} - secrets: - E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }} - - cli-tests-staging: - name: Staging / CLI Tests - needs: changes - if: ${{ needs.changes.outputs.cli == 'true' || github.event_name == 'workflow_dispatch' }} - uses: ./.github/workflows/cli_tests.yml - with: - E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }} - secrets: - E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }} - - code-interpreter-js-tests-staging: - name: Staging / Code Interpreter JS SDK Tests - needs: changes - if: ${{ needs.changes.outputs.code_interpreter_js == 'true' || github.event_name == 'workflow_dispatch' }} - uses: ./.github/workflows/code_interpreter_js_tests.yml - with: - E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }} - run_recovery_tests: false - # Staging only checks backend compatibility, so the Node leg suffices; - # Bun/Deno runtime coverage runs against production above. - node-only: true - secrets: - E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }} - - code-interpreter-python-tests-staging: - name: Staging / Code Interpreter Python SDK Tests - needs: changes - if: ${{ needs.changes.outputs.code_interpreter_python == 'true' || github.event_name == 'workflow_dispatch' }} - uses: ./.github/workflows/code_interpreter_python_tests.yml - with: - E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }} - run_recovery_tests: false - secrets: - E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }} - - desktop-js-tests-staging: - name: Staging / Desktop JS SDK Tests - needs: changes - if: ${{ needs.changes.outputs.desktop_js == 'true' || github.event_name == 'workflow_dispatch' }} - uses: ./.github/workflows/desktop_js_tests.yml - with: - E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }} - run_tests: false - secrets: - E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }} - - desktop-python-tests-staging: - name: Staging / Desktop Python SDK Tests - needs: changes - if: ${{ needs.changes.outputs.desktop_python == 'true' || github.event_name == 'workflow_dispatch' }} - uses: ./.github/workflows/desktop_python_tests.yml - with: - E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }} - run_tests: false - secrets: - E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }} - dockerfile-utils-js-tests: name: Dockerfile Utils JS Tests needs: changes @@ -282,11 +202,11 @@ jobs: run: | echo "Job results: ${{ join(needs.*.result, ', ') }}" if ${{ contains(needs.*.result, 'failure') }}; then - echo "::error::Change detection or a Production SDK test suite failed." + echo "::error::Change detection or an SDK test suite failed." exit 1 fi if ${{ contains(needs.*.result, 'cancelled') }}; then - echo "::error::Change detection or a Production SDK test suite was cancelled; tests were not verified — re-run before merging." + echo "::error::Change detection or an SDK test suite was cancelled; tests were not verified — re-run before merging." exit 1 fi - echo "All Production SDK test suites passed or were skipped." + echo "All SDK test suites passed or were skipped."