Skip to content

Commit 38d6d48

Browse files
committed
Rename to test template
1 parent 18c30ba commit 38d6d48

File tree

7 files changed

+24
-23
lines changed

7 files changed

+24
-23
lines changed

.github/workflows/build_template.yml renamed to .github/workflows/build_test_template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build Template
33
on:
44
workflow_call:
55
secrets:
6-
E2B_ACCESS_TOKEN:
6+
E2B_TEST_ACCESS_TOKEN:
77
required: true
88
DOCKERHUB_USERNAME:
99
required: true
@@ -62,7 +62,7 @@ jobs:
6262
echo "template_id=$TEMPLATE_ID" >> $GITHUB_OUTPUT
6363
working-directory: ./template
6464
env:
65-
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
65+
E2B_ACCESS_TOKEN: ${{ secrets.E2B_TEST_ACCESS_TOKEN }}
6666
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
6767

6868
- name: Output template ID

.github/workflows/cleanup_build_template.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Cleanup Build Template
33
on:
44
workflow_call:
55
secrets:
6-
E2B_ACCESS_TOKEN:
6+
E2B_TEST_ACCESS_TOKEN:
77
required: true
88
inputs:
99
E2B_DOMAIN:
1010
required: false
1111
type: string
12-
E2B_CI_TEMPLATE:
12+
E2B_TEST_TEMPLATE:
1313
required: true
1414
type: string
1515

@@ -27,7 +27,7 @@ jobs:
2727
- name: Cleanup E2B template
2828
id: cleanup-template
2929
run: |
30-
e2b template delete "${{ inputs.E2B_CI_TEMPLATE }}"
30+
e2b template delete "${{ inputs.E2B_TEST_TEMPLATE }}"
3131
env:
32-
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
32+
E2B_ACCESS_TOKEN: ${{ secrets.E2B_TEST_ACCESS_TOKEN }}
3333
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}

.github/workflows/js_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
E2B_DOMAIN:
1010
required: false
1111
type: string
12-
E2B_CI_TEMPLATE:
12+
E2B_TEST_TEMPLATE:
1313
required: false
1414
type: string
1515

@@ -57,19 +57,19 @@ jobs:
5757
env:
5858
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
5959
E2B_DOMAIN: ${{ secrets.E2B_DOMAIN }}
60-
E2B_CI_TEMPLATE: ${{ inputs.E2B_CI_TEMPLATE }}
60+
E2B_TEST_TEMPLATE: ${{ inputs.E2B_TEST_TEMPLATE }}
6161

6262
- name: Install Bun
6363
uses: oven-sh/setup-bun@v2
6464
with:
65-
version: 1.1.x
65+
bun-version: 1.1.x
6666

6767
- name: Run Bun tests
6868
run: pnpm test:bun
6969
env:
7070
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
7171
E2B_DOMAIN: ${{ secrets.E2B_DOMAIN }}
72-
E2B_CI_TEMPLATE: ${{ inputs.E2B_CI_TEMPLATE }}
72+
E2B_TEST_TEMPLATE: ${{ inputs.E2B_TEST_TEMPLATE }}
7373

7474
- name: Install Deno
7575
uses: denoland/setup-deno@v1
@@ -81,4 +81,4 @@ jobs:
8181
env:
8282
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
8383
E2B_DOMAIN: ${{ secrets.E2B_DOMAIN }}
84-
E2B_CI_TEMPLATE: ${{ inputs.E2B_CI_TEMPLATE }}
84+
E2B_TEST_TEMPLATE: ${{ inputs.E2B_TEST_TEMPLATE }}

.github/workflows/pull_request.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ on:
1515

1616
jobs:
1717
build-template:
18-
uses: ./.github/workflows/build_template.yml
18+
uses: ./.github/workflows/build_test_template.yml
1919
secrets:
2020
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
21-
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
21+
E2B_ACCESS_TOKEN: ${{ secrets.E2B_TEST_ACCESS_TOKEN }}
2222
with:
2323
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}
2424
js-sdk:
@@ -29,7 +29,7 @@ jobs:
2929
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
3030
with:
3131
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}
32-
E2B_CI_TEMPLATE: ${{ needs.build-template.outputs.template_id }}
32+
E2B_TEST_TEMPLATE: ${{ needs.build-template.outputs.template_id }}
3333
python-sdk:
3434
uses: ./.github/workflows/python_tests.yml
3535
needs: build-template
@@ -38,7 +38,7 @@ jobs:
3838
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
3939
with:
4040
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}
41-
E2B_CI_TEMPLATE: ${{ needs.build-template.outputs.template_id }}
41+
E2B_TEST_TEMPLATE: ${{ needs.build-template.outputs.template_id }}
4242
cleanup-build-template:
4343
uses: ./.github/workflows/cleanup_build_template.yml
4444
needs: [build-template, js-sdk, python-sdk]
@@ -47,6 +47,6 @@ jobs:
4747
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
4848
with:
4949
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}
50-
E2B_CI_TEMPLATE: ${{ needs.build-template.outputs.template_id }}
50+
E2B_TEST_TEMPLATE: ${{ needs.build-template.outputs.template_id }}
5151
charts-tests:
5252
uses: ./.github/workflows/charts_tests.yml

.github/workflows/python_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
E2B_DOMAIN:
1010
required: false
1111
type: string
12-
E2B_CI_TEMPLATE:
12+
E2B_TEST_TEMPLATE:
1313
required: false
1414
type: string
1515

@@ -51,4 +51,4 @@ jobs:
5151
env:
5252
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
5353
E2B_DOMAIN: ${{ inputs.E2B_DOMAIN }}
54-
E2B_CI_TEMPLATE: ${{ inputs.E2B_CI_TEMPLATE }}
54+
E2B_TEST_TEMPLATE: ${{ inputs.E2B_TEST_TEMPLATE }}

js/tests/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { test as base } from 'vitest'
33

44
const timeoutMs = 60_000
55

6-
const template = process.env.E2B_CI_TEMPLATE || 'code-interpreter-v1'
6+
const template = process.env.E2B_TEST_TEMPLATE || 'code-interpreter-v1'
77

88
interface SandboxFixture {
99
sandbox: Sandbox

python/tests/conftest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99

1010
timeout = 60
1111

12+
1213
@pytest.fixture()
1314
def template():
14-
return os.getenv("E2B_CI_TEMPLATE", "code-interpreter-v1")
15+
return os.getenv("E2B_TEST_TEMPLATE", "code-interpreter-v1")
1516

1617

1718
@pytest.fixture()
@@ -32,13 +33,13 @@ def sandbox(template, debug):
3233

3334
@pytest_asyncio.fixture
3435
async def async_sandbox(template, debug):
35-
sandbox = await AsyncSandbox.create(template, timeout=timeout)
36+
async_sandbox = await AsyncSandbox.create(template, timeout=timeout)
3637

3738
try:
38-
yield sandbox
39+
yield async_sandbox
3940
finally:
4041
try:
41-
await sandbox.kill()
42+
await async_sandbox.kill()
4243
except:
4344
if not debug:
4445
warning(

0 commit comments

Comments
 (0)