Flag for securing envd access with auth token #203
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test JS SDK | |
on: | |
workflow_call: | |
secrets: | |
E2B_API_KEY: | |
required: true | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
test: | |
defaults: | |
run: | |
working-directory: ./packages/js-sdk | |
name: Build and test SDK | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
id: pnpm-install | |
with: | |
version: 9.5 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Configure pnpm | |
run: | | |
pnpm config set auto-install-peers true | |
pnpm config set exclude-links-from-lockfile true | |
- name: Install dependencies | |
run: | | |
pnpm install --frozen-lockfile | |
npx playwright install --with-deps | |
- name: Test build | |
run: pnpm build | |
- name: Run Node tests | |
run: pnpm test | |
env: | |
E2B_API_KEY: ${{ secrets.E2B_API_KEY }} | |
- name: Install Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Run Bun tests | |
run: pnpm test:bun | |
env: | |
E2B_API_KEY: ${{ secrets.E2B_API_KEY }} | |
- name: Install Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Run Deno tests | |
run: pnpm test:deno | |
env: | |
E2B_API_KEY: ${{ secrets.E2B_API_KEY }} |