chore(epic/1.0_breaking_changes): release 1.0.0-beta.1 #1902
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
| # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
| name: Run Unit Tests | |
| on: | |
| push: | |
| branches: [ "main", "epic/**" ] | |
| pull_request: | |
| branches: [ "main", "epic/**" ] | |
| paths-ignore: | |
| - '**.md' | |
| - 'LICENSE' | |
| - '.github/CODEOWNERS' | |
| - 'src/samples/**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| node-version: [20, 22, 24] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npm test | |
| # Edge runtime tests use @edge-runtime/vm to emulate Cloudflare Workers, | |
| # Vercel Edge Functions, and similar environments. This ensures the SDK | |
| # works correctly in non-Node.js server environments. | |
| test-edge: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npm run test:edge | |
| # Run coverage once to generate a report. | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Base Branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.base.ref || 'main' }} | |
| clean: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| - name: Install & Test (Base Branch) | |
| timeout-minutes: 10 | |
| run: | | |
| npm ci | |
| npm run coverage | |
| mv coverage/coverage-summary.json ${{ runner.temp }}/coverage-base-summary.json | |
| - name: Upload Artifact (base) | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| name: coverage-report | |
| path: coverage | |
| retention-days: 14 | |
| - name: Checkout PR Branch | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@v4 | |
| with: | |
| clean: true | |
| - name: Install & Test (PR) | |
| if: github.event_name == 'pull_request' | |
| timeout-minutes: 10 | |
| run: | | |
| npm ci | |
| npm run coverage | |
| mv coverage/coverage-summary.json coverage-pr-summary.json | |
| mv ${{ runner.temp }}/coverage-base-summary.json coverage-base-summary.json | |
| - name: Save PR number | |
| run: | | |
| echo ${{ github.event.number }} > ./PR_NUMBER | |
| - name: Upload Coverage Artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| name: coverage-data | |
| path: | | |
| coverage-base-summary.json | |
| coverage-pr-summary.json | |
| coverage/ | |
| PR_NUMBER | |
| retention-days: 1 |