Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

chore(ci): add unified SDK tests workflow with staging (#1141)

Jakub Dobryc5e64341cc77
diff --git a/.github/workflows/cli_tests.yml b/.github/workflows/cli_tests.yml
index 7a9f94e3f..47fd73c8e 100644
--- a/.github/workflows/cli_tests.yml
+++ b/.github/workflows/cli_tests.yml
@@ -2,12 +2,14 @@ name: Test CLI
on:
workflow_call:
+ inputs:
+ E2B_DOMAIN:
+ required: false
+ type: string
+ default: ''
secrets:
E2B_API_KEY:
required: true
- pull_request:
- branches:
- - main
permissions:
contents: read
@@ -67,3 +69,4 @@ jobs:
working-directory: ./packages/cli
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+ E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
diff --git a/.github/workflows/js_sdk_tests.yml b/.github/workflows/js_sdk_tests.yml
index b4b83c72b..e235b9b22 100644
--- a/.github/workflows/js_sdk_tests.yml
+++ b/.github/workflows/js_sdk_tests.yml
@@ -2,12 +2,14 @@ name: Test JS SDK
on:
workflow_call:
+ inputs:
+ E2B_DOMAIN:
+ required: false
+ type: string
+ default: ''
secrets:
E2B_API_KEY:
required: true
- pull_request:
- branches:
- - main
permissions:
contents: read
@@ -83,6 +85,7 @@ jobs:
run: pnpm test
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+ E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
- name: Install Bun
uses: oven-sh/setup-bun@v2
@@ -91,6 +94,7 @@ jobs:
run: pnpm test:bun
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+ E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
- name: Install Deno
uses: denoland/setup-deno@v1
@@ -101,3 +105,4 @@ jobs:
run: pnpm test:deno
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+ E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
diff --git a/.github/workflows/python_sdk_tests.yml b/.github/workflows/python_sdk_tests.yml
index 51075c80f..6c74f777b 100644
--- a/.github/workflows/python_sdk_tests.yml
+++ b/.github/workflows/python_sdk_tests.yml
@@ -2,12 +2,14 @@ name: Test Python SDK
on:
workflow_call:
+ inputs:
+ E2B_DOMAIN:
+ required: false
+ type: string
+ default: ''
secrets:
E2B_API_KEY:
required: true
- pull_request:
- branches:
- - main
permissions:
contents: read
@@ -58,3 +60,4 @@ jobs:
run: poetry run pytest --verbose --numprocesses=4
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+ E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
diff --git a/.github/workflows/sdk_tests.yml b/.github/workflows/sdk_tests.yml
new file mode 100644
index 000000000..6e26cd1b8
--- /dev/null
+++ b/.github/workflows/sdk_tests.yml
@@ -0,0 +1,53 @@
+name: SDK Tests
+
+on:
+ pull_request:
+ branches:
+ - main
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ js-tests:
+ name: Production / JS SDK Tests
+ uses: ./.github/workflows/js_sdk_tests.yml
+ secrets:
+ E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+
+ python-tests:
+ name: Production / Python SDK Tests
+ uses: ./.github/workflows/python_sdk_tests.yml
+ secrets:
+ E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+
+ cli-tests:
+ name: Production / CLI Tests
+ uses: ./.github/workflows/cli_tests.yml
+ secrets:
+ E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
+
+ js-tests-staging:
+ name: Staging / JS SDK Tests
+ uses: ./.github/workflows/js_sdk_tests.yml
+ with:
+ E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
+ secrets:
+ E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}
+
+ python-tests-staging:
+ name: Staging / Python SDK Tests
+ 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
+ uses: ./.github/workflows/cli_tests.yml
+ with:
+ E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
+ secrets:
+ E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}