chore: release main #55
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 | |
| on: | |
| # Ensure GitHub actions are not run twice for same commits | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: | |
| - '**' | |
| - '!release-please--**' | |
| merge_group: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest, windows-latest] | |
| node-version: ['24'] | |
| # `node-install-version` is what `setup-node` actually installs. | |
| # `node-version` is the display value used in the matrix job name | |
| # (which required status checks are pinned to), so it must stay stable. | |
| node-install-version: ['24.15.0'] | |
| include: | |
| - os: ubuntu-latest | |
| # min node-version required by optional native bindings (e.g. @oxc-parser) | |
| node-version: '20.19.0' | |
| node-install-version: '20.19.0' | |
| fail-fast: false | |
| steps: | |
| # Increasing the maximum number of open files. See: | |
| # https://github.com/actions/virtual-environments/issues/268 | |
| - name: Increase open file limit | |
| run: sudo ulimit -Sn 65536 | |
| if: "${{ matrix.os == 'macOS-latest' }}" | |
| - run: git config --global core.symlinks true | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Node.js ${{ matrix.node-install-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-install-version }} | |
| cache: 'npm' | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: 2.5.6 | |
| - name: Setup Deno dependencies | |
| run: deno cache https://deno.land/x/eszip@v0.55.2/eszip.ts | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Build | |
| run: npm run build --workspaces=true | |
| # Fork PRs don't have access to secrets, so live E2E tests (e.g. Netlify | |
| # deploy tests) must be skipped. | |
| - name: Flag fork PR | |
| if: | |
| ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != | |
| 'netlify/framework-adapters' }} | |
| run: echo "SKIP_LIVE_TESTS=true" >> "$GITHUB_ENV" | |
| - name: Tests | |
| # angular-runtime requires Node 22+, so it's excluded on the Node 20 job | |
| if: ${{ matrix.node-version != '20.19.0' }} | |
| run: npm run test --workspaces=true | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| - name: Tests (excludes angular-runtime, which requires Node 22+) | |
| if: ${{ matrix.node-version == '20.19.0' }} | |
| run: >- | |
| npm run test --workspace=packages/nuxt-module --workspace=packages/vite-plugin | |
| --workspace=packages/vite-plugin-tanstack-start | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| - name: Warn if live tests were skipped | |
| if: ${{ env.SKIP_LIVE_TESTS == 'true' }} | |
| run: | | |
| echo "::warning::Live E2E tests were skipped because secrets are not available (likely a fork PR)." | |
| echo "## ⚠️ Live E2E tests were skipped" >> "$GITHUB_STEP_SUMMARY" | |
| echo "" >> "$GITHUB_STEP_SUMMARY" | |
| echo "This workflow run does not have access to secrets (likely a fork PR)." >> "$GITHUB_STEP_SUMMARY" | |
| echo "Live tests that deploy to Netlify were skipped." >> "$GITHUB_STEP_SUMMARY" | |
| echo "Maintainers: before merging, verify that these tests pass or aren't relevant." >> "$GITHUB_STEP_SUMMARY" |