Workflow file for this run
This file contains 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 compatibility (across node versions and OSes) | |
on: | |
push: | |
# Tests should already be run on PRs | |
branches: | |
- '**' | |
- '!main' | |
paths: | |
- packages/js-sdk/**/* | |
- .github/workflows/js_sdk_compat_tests.yml | |
permissions: | |
contents: read | |
jobs: | |
test: | |
defaults: | |
run: | |
working-directory: ./packages/js-sdk | |
name: Build and test SDK on Node ${{ matrix.node-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [ 20, 18, 16 ] | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build SDK | |
run: pnpm run build | |
- name: Run tests | |
run: pnpm run test-smoke | |
env: | |
E2B_API_KEY: ${{ secrets.E2B_API_KEY }} |