File tree Expand file tree Collapse file tree 7 files changed +24
-23
lines changed Expand file tree Collapse file tree 7 files changed +24
-23
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Build Template
33on :
44 workflow_call :
55 secrets :
6- E2B_ACCESS_TOKEN :
6+ E2B_TEST_ACCESS_TOKEN :
77 required : true
88 DOCKERHUB_USERNAME :
99 required : true
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
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ name: Cleanup Build Template
33on :
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
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 }}
Original file line number Diff line number Diff line change 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
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 }}
Original file line number Diff line number Diff line change 1515
1616jobs :
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 :
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
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]
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
Original file line number Diff line number Diff line change 99 E2B_DOMAIN :
1010 required : false
1111 type : string
12- E2B_CI_TEMPLATE :
12+ E2B_TEST_TEMPLATE :
1313 required : false
1414 type : string
1515
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 }}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { test as base } from 'vitest'
33
44const 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
88interface SandboxFixture {
99 sandbox : Sandbox
Original file line number Diff line number Diff line change 99
1010timeout = 60
1111
12+
1213@pytest .fixture ()
1314def 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
3435async 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 (
You can’t perform that action at this time.
0 commit comments