Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Use .tool-versions file to sync local dev and github actions (#955)

Joseph Lombrozo2942f481ada2
diff --git a/.github/workflows/cli_tests.yml b/.github/workflows/cli_tests.yml
index 60738c83f..59ba49447 100644
--- a/.github/workflows/cli_tests.yml
+++ b/.github/workflows/cli_tests.yml
@@ -23,16 +23,23 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- name: Setup Node
uses: actions/setup-node@v3
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
@@ -51,4 +58,4 @@ jobs:
- name: Run tests
run: pnpm test
env:
- E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
\ No newline at end of file
+ E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
diff --git a/.github/workflows/generated_files.yml b/.github/workflows/generated_files.yml
index e5d22e231..67e3da637 100644
--- a/.github/workflows/generated_files.yml
+++ b/.github/workflows/generated_files.yml
@@ -11,16 +11,23 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- name: Setup Node
uses: actions/setup-node@v4
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
diff --git a/.github/workflows/js_sdk_tests.yml b/.github/workflows/js_sdk_tests.yml
index a06317c5b..083702a5f 100644
--- a/.github/workflows/js_sdk_tests.yml
+++ b/.github/workflows/js_sdk_tests.yml
@@ -23,16 +23,23 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- name: Setup Node
uses: actions/setup-node@v3
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
@@ -65,7 +72,7 @@ jobs:
- name: Install Deno
uses: denoland/setup-deno@v1
with:
- deno-version: v1.x
+ deno-version: v${{ env.TOOL_VERSION_DENO }}
- name: Run Deno tests
run: pnpm test:deno
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 1fe7df04b..faa628e7a 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -12,14 +12,21 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- uses: pnpm/action-setup@v4
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- - name: Setup Node.js 20
+ - name: Setup Node.js
uses: actions/setup-node@v4
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
cache: pnpm
- name: Configure pnpm
@@ -33,12 +40,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: '3.9'
+ python-version: '${{ env.TOOL_VERSION_PYTHON }}'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
- version: 1.8.3
+ version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
diff --git a/.github/workflows/publish_packages.yml b/.github/workflows/publish_packages.yml
index 04b9edc1b..153524935 100644
--- a/.github/workflows/publish_packages.yml
+++ b/.github/workflows/publish_packages.yml
@@ -29,27 +29,34 @@ jobs:
with:
token: ${{ steps.app-token.outputs.token }}
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: '3.9'
+ python-version: '${{ env.TOOL_VERSION_PYTHON }}'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
- version: 1.8.3
+ version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- uses: pnpm/action-setup@v4
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- - name: Setup Node.js 20
+ - name: Setup Node.js
uses: actions/setup-node@v3
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
cache: pnpm
- name: Configure pnpm
diff --git a/.github/workflows/python_sdk_tests.yml b/.github/workflows/python_sdk_tests.yml
index f3c42663e..2ed754c6d 100644
--- a/.github/workflows/python_sdk_tests.yml
+++ b/.github/workflows/python_sdk_tests.yml
@@ -23,15 +23,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- name: Set up Python
uses: actions/setup-python@v4
with:
- python-version: '3.9'
+ python-version: '${{ env.TOOL_VERSION_PYTHON }}'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
- version: 1.8.3
+ version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0e5e5ccf8..163f3aaca 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -18,16 +18,23 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- name: Setup Node
uses: actions/setup-node@v3
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
@@ -59,16 +66,23 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- name: Setup Node
uses: actions/setup-node@v3
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
diff --git a/.github/workflows/release_candidates.yml b/.github/workflows/release_candidates.yml
index edf28d6ba..56dd7b508 100644
--- a/.github/workflows/release_candidates.yml
+++ b/.github/workflows/release_candidates.yml
@@ -17,16 +17,23 @@ jobs:
with:
ref: ${{ github.head_ref }}
+ - name: Parse .tool-versions
+ uses: wistia/[email protected]
+ with:
+ filename: '.tool-versions'
+ uppercase: 'true'
+ prefix: 'tool_version_'
+
- uses: pnpm/action-setup@v4
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') || contains( github.event.pull_request.labels.*.name, 'cli-rc') }}
with:
- version: 9.15.5
+ version: '${{ env.TOOL_VERSION_PNPM }}'
- - name: Setup Node.js 20
+ - name: Setup Node.js
uses: actions/setup-node@v4
if: ${{ contains( github.event.pull_request.labels.*.name, 'js-rc') || contains( github.event.pull_request.labels.*.name, 'cli-rc') || contains( github.event.pull_request.labels.*.name, 'python-rc') }}
with:
- node-version: '20.x'
+ node-version: '${{ env.TOOL_VERSION_NODEJS }}'
registry-url: https://registry.npmjs.org
cache: pnpm
@@ -40,13 +47,13 @@ jobs:
uses: actions/setup-python@v4
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
with:
- python-version: '3.9'
+ python-version: '${{ env.TOOL_VERSION_PYTHON }}'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
if: ${{ contains( github.event.pull_request.labels.*.name, 'python-rc') }}
with:
- version: 1.8.3
+ version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
diff --git a/.tool-versions b/.tool-versions
new file mode 100644
index 000000000..6bb3921cf
--- /dev/null
+++ b/.tool-versions
@@ -0,0 +1,5 @@
+deno 1.46.3
+nodejs 20.19.5
+pnpm 9.15.5
+python 3.9
+poetry 1.8.3