Release v17.0.0 rc.2 #2241
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 4 | |
| matrix: | |
| # Keep these numeric: the Guide Snippets Check step below is gated | |
| # on `matrix.node-version == 22`, which silently never matches if | |
| # these become strings like "22.x". | |
| node-version: [22, 24] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --network-concurrency 1 | |
| - name: Build | |
| run: pnpm run build:prod | |
| - name: Unit Tests | |
| run: pnpm run test:node | |
| - name: Integration Tests | |
| run: pnpm run test:integration | |
| # Hermetic guide-snippet gate: validates docs snippet markers and | |
| # typechecks examples/guides against src/, so an SDK API change that | |
| # breaks documented example code fails the PR. Execution of the | |
| # snippets runs in the guides_pr.yml quickstart job, not here. | |
| # tsc output does not vary by Node version, so run once. | |
| - name: Guide Snippets Check | |
| if: matrix.node-version == 22 | |
| run: pnpm run docs:snippets:check | |
| # Compile-time regression tests (test/types/): code that must typecheck | |
| # against src/, e.g. equals() on union-typed XDR values (issue #1630). | |
| # tsc output does not vary by Node version, so run once. | |
| - name: Type Tests | |
| if: matrix.node-version == 22 | |
| run: pnpm run test:types | |
| # Browser tests get their own job per transport rather than two steps in | |
| # `build_and_test`. Each pass loads the SDK source graph — ~470 unbundled | |
| # `src/xdr` modules — once per test file, across 220 files and two browsers. | |
| # Run back to back on one runner, the second pass reliably lost its browser | |
| # page mid-run ("Browser connection was closed while running tests"), always | |
| # after ~65 files with every test that ran passing. A fresh runner per | |
| # transport keeps each pass within the runner's memory budget. | |
| browser_test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [22, 24] | |
| transport: [fetch, axios] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --network-concurrency 1 | |
| - name: Install Playwright Chromium | |
| run: pnpm exec playwright install chromium | |
| - name: Install Playwright Firefox | |
| run: pnpm exec playwright install firefox | |
| - name: Install Playwright system dependencies | |
| run: pnpm exec playwright install-deps chromium firefox | |
| - name: Browser Tests (${{ matrix.transport }}) | |
| run: pnpm run test:browser:${{ matrix.transport }} | |
| # Placeholder to satisfy the `build_and_test (20)` required status check in | |
| # the `protect-main` ruleset. Node 20 was dropped from the test matrix | |
| # (engines.node is now >=22), but the ruleset still requires that context by | |
| # name, so without this every PR would stay "Expected" and block merge. | |
| # Remove this job once the ruleset is repointed to `build_and_test (22)`. | |
| build_and_test_node20_placeholder: | |
| name: build_and_test (20) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: No-op | |
| run: echo "Node 20 is no longer supported; placeholder for the required status check." |