Skip to content

Commit 9aefef7

Browse files
authored
Merge pull request #25 from e2b-dev/beta
Use the new SDK V1 Beta
2 parents a9e1639 + 76d5b44 commit 9aefef7

File tree

142 files changed

+9621
-6182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+9621
-6182
lines changed

.changeset/pink-weeks-call.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@e2b/code-interpreter-python': major
3+
'@e2b/code-interpreter': major
4+
---
5+
6+
New improved SDK

.github/workflows/js_tests.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
publish:
13+
test:
1414
defaults:
1515
run:
1616
working-directory: ./js
@@ -21,10 +21,10 @@ jobs:
2121
uses: actions/checkout@v3
2222

2323
- name: Install pnpm
24-
uses: pnpm/action-setup@v2
24+
uses: pnpm/action-setup@v3
2525
id: pnpm-install
2626
with:
27-
version: 8
27+
version: 9.5
2828

2929
- name: Setup Node
3030
uses: actions/setup-node@v3
@@ -45,7 +45,27 @@ jobs:
4545
- name: Test build
4646
run: pnpm build
4747

48-
- name: Run node tests
49-
run: pnpm run test
48+
- name: Run Node tests
49+
run: pnpm test
50+
env:
51+
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
52+
53+
- name: Install Bun
54+
uses: oven-sh/setup-bun@v2
55+
with:
56+
version: 1.1.x
57+
#
58+
# - name: Run Bun tests
59+
# run: pnpm test:bun
60+
# env:
61+
# E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
62+
63+
- name: Install Deno
64+
uses: denoland/setup-deno@v1
65+
with:
66+
deno-version: v1.x
67+
68+
- name: Run Deno tests
69+
run: pnpm test:deno
5070
env:
5171
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}

.github/workflows/pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Python package
1+
name: Test package
22

33
on:
44
push:
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
outputs:
1313
python: ${{ steps.filter.outputs.python }}
14+
js: ${{ steps.filter.outputs.js }}
1415
steps:
1516
- name: Checkout repository
1617
uses: actions/checkout@v3

.github/workflows/python_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ jobs:
4040
run: poetry build
4141

4242
- name: Run tests
43-
run: poetry run pytest --verbose -x
43+
run: poetry run pytest -n 4 --verbose -x
4444
env:
4545
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}

.github/workflows/release.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
uses: actions/checkout@v3
2222

2323
- name: Install pnpm
24-
uses: pnpm/action-setup@v2
24+
uses: pnpm/action-setup@v3
2525
id: pnpm-install
2626
with:
27-
version: 8
27+
version: 9.5
2828

2929
- name: Setup Node
3030
uses: actions/setup-node@v3
@@ -109,7 +109,7 @@ jobs:
109109
- name: Set up Python
110110
uses: actions/setup-python@v4
111111
with:
112-
python-version: "3.10"
112+
python-version: "3.8"
113113

114114
- name: Install and configure Poetry
115115
uses: snok/install-poetry@v1
@@ -119,12 +119,14 @@ jobs:
119119
virtualenvs-in-project: true
120120
installer-parallel: true
121121

122-
- uses: pnpm/action-setup@v2
122+
- uses: pnpm/action-setup@v3
123+
with:
124+
version: 9.5
123125

124-
- name: Setup Node.js 20
126+
- name: Setup Node.js 18
125127
uses: actions/setup-node@v3
126128
with:
127-
node-version: 20
129+
node-version: '18.x'
128130
cache: pnpm
129131

130132
- name: Configure pnpm

.github/workflows/release_candidates.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919

2020
- uses: pnpm/action-setup@v3
2121
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
22+
with:
23+
version: 9.5
2224

23-
- name: Setup Node.js 20
25+
- name: Setup Node.js 18
2426
uses: actions/setup-node@v4
2527
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
2628
with:
27-
node-version: 20
29+
node-version: '18.x'
2830
registry-url: https://registry.npmjs.org
2931
cache: pnpm
3032

@@ -38,6 +40,14 @@ jobs:
3840
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
3941
run: pnpm install --frozen-lockfile
4042

43+
- name: Test JS SDK
44+
working-directory: js
45+
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
46+
run: |
47+
pnpm run test
48+
env:
49+
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
50+
4151
- name: Release JS Candidate
4252
working-directory: js
4353
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') }}
@@ -51,7 +61,7 @@ jobs:
5161
uses: actions/setup-python@v4
5262
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
5363
with:
54-
python-version: "3.10"
64+
python-version: "3.8"
5565

5666
- name: Install and configure Poetry
5767
uses: snok/install-poetry@v1
@@ -62,6 +72,15 @@ jobs:
6272
virtualenvs-in-project: true
6373
installer-parallel: true
6474

75+
- name: Test Python SDK
76+
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
77+
working-directory: python
78+
run: |
79+
poetry install
80+
poetry run pytest -n 4 --verbose -x
81+
env:
82+
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
83+
6584
- name: Release Candidate
6685
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
6786
working-directory: python

.github/workflows/template.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'template/**'
77
- '.github/workflows/template.yml'
88
branches:
9-
- beta
9+
- main
1010

1111
permissions:
1212
contents: read
@@ -36,8 +36,8 @@ jobs:
3636
run: |
3737
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest || true
3838
docker buildx build \
39-
--file e2b.Dockerfile \
40-
--platform linux/amd64,linux/arm64 \
39+
--file Dockerfile \
40+
--platform linux/amd64 \
4141
--push \
4242
--tag ${{ secrets.DOCKERHUB_USERNAME }}/code-interpreter:latest .
4343
@@ -47,4 +47,4 @@ jobs:
4747
- name: Build e2b
4848
run: e2b template build
4949
env:
50-
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}
50+
E2B_ACCESS_TOKEN: ${{ secrets.E2B_ACCESS_TOKEN }}

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ enable-pre-post-scripts=true
22
auto-install-peers=true
33
exclude-links-from-lockfile=true
44
prefer-workspace-packages=false
5-
link-workspace-packages=false
5+
link-workspace-packages=false
6+
engine-strict=true

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/.next/
2+
3+
# imporatant to keep // $HighlightLine comments at the end of the line
4+
apps/web/src/code/
5+
6+
7+
**/*.mdx
8+
**/code/**/*

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false,
4+
"trailingComma": "es5"
5+
}

0 commit comments

Comments
 (0)