Skip to content

Commit c5e6434

Browse files
authored
chore(ci): add unified SDK tests workflow with staging (#1141)
1 parent ef25bfe commit c5e6434

4 files changed

Lines changed: 73 additions & 9 deletions

File tree

.github/workflows/cli_tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: Test CLI
22

33
on:
44
workflow_call:
5+
inputs:
6+
E2B_DOMAIN:
7+
required: false
8+
type: string
9+
default: ''
510
secrets:
611
E2B_API_KEY:
712
required: true
8-
pull_request:
9-
branches:
10-
- main
1113

1214
permissions:
1315
contents: read
@@ -67,3 +69,4 @@ jobs:
6769
working-directory: ./packages/cli
6870
env:
6971
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
72+
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}

.github/workflows/js_sdk_tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: Test JS SDK
22

33
on:
44
workflow_call:
5+
inputs:
6+
E2B_DOMAIN:
7+
required: false
8+
type: string
9+
default: ''
510
secrets:
611
E2B_API_KEY:
712
required: true
8-
pull_request:
9-
branches:
10-
- main
1113

1214
permissions:
1315
contents: read
@@ -83,6 +85,7 @@ jobs:
8385
run: pnpm test
8486
env:
8587
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
88+
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
8689

8790
- name: Install Bun
8891
uses: oven-sh/setup-bun@v2
@@ -91,6 +94,7 @@ jobs:
9194
run: pnpm test:bun
9295
env:
9396
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
97+
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
9498

9599
- name: Install Deno
96100
uses: denoland/setup-deno@v1
@@ -101,3 +105,4 @@ jobs:
101105
run: pnpm test:deno
102106
env:
103107
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
108+
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}

.github/workflows/python_sdk_tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: Test Python SDK
22

33
on:
44
workflow_call:
5+
inputs:
6+
E2B_DOMAIN:
7+
required: false
8+
type: string
9+
default: ''
510
secrets:
611
E2B_API_KEY:
712
required: true
8-
pull_request:
9-
branches:
10-
- main
1113

1214
permissions:
1315
contents: read
@@ -58,3 +60,4 @@ jobs:
5860
run: poetry run pytest --verbose --numprocesses=4
5961
env:
6062
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
63+
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}

.github/workflows/sdk_tests.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: SDK Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
js-tests:
14+
name: Production / JS SDK Tests
15+
uses: ./.github/workflows/js_sdk_tests.yml
16+
secrets:
17+
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
18+
19+
python-tests:
20+
name: Production / Python SDK Tests
21+
uses: ./.github/workflows/python_sdk_tests.yml
22+
secrets:
23+
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
24+
25+
cli-tests:
26+
name: Production / CLI Tests
27+
uses: ./.github/workflows/cli_tests.yml
28+
secrets:
29+
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
30+
31+
js-tests-staging:
32+
name: Staging / JS SDK Tests
33+
uses: ./.github/workflows/js_sdk_tests.yml
34+
with:
35+
E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
36+
secrets:
37+
E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}
38+
39+
python-tests-staging:
40+
name: Staging / Python SDK Tests
41+
uses: ./.github/workflows/python_sdk_tests.yml
42+
with:
43+
E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
44+
secrets:
45+
E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}
46+
47+
cli-tests-staging:
48+
name: Staging / CLI Tests
49+
uses: ./.github/workflows/cli_tests.yml
50+
with:
51+
E2B_DOMAIN: ${{ vars.E2B_DOMAIN_STAGING }}
52+
secrets:
53+
E2B_API_KEY: ${{ secrets.E2B_API_KEY_STAGING }}

0 commit comments

Comments
 (0)