fix(create-rsbuild): update React Compiler babel config (#7393) #8782
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: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| # Configure Node.js memory limit to 6GB (default GitHub Actions limit is 7GB) | |
| NODE_OPTIONS: --max-old-space-size=6144 | |
| jobs: | |
| # ======== ut ======== | |
| ut: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| # run ut on macOS, as SWC cases will fail on Ubuntu CI | |
| os: [macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install Pnpm | |
| run: | | |
| npm install -g corepack@latest --force | |
| corepack enable | |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: changes | |
| with: | |
| predicate-quantifier: 'every' | |
| filters: | | |
| changed: | |
| - "!**/*.md" | |
| - "!**/*.mdx" | |
| - "!**/_meta.json" | |
| - "!**/dictionary.txt" | |
| - name: Setup Node.js | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| - name: Install Dependencies | |
| if: steps.changes.outputs.changed == 'true' | |
| run: pnpm install | |
| - name: Unit Test | |
| if: steps.changes.outputs.changed == 'true' | |
| run: node --run test | |
| # ======== e2e ======== | |
| e2e: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install Pnpm | |
| run: | | |
| npm install -g corepack@latest --force | |
| corepack enable | |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: changes | |
| with: | |
| predicate-quantifier: 'every' | |
| filters: | | |
| changed: | |
| - "!**/*.md" | |
| - "!**/*.mdx" | |
| - "!**/_meta.json" | |
| - "!**/dictionary.txt" | |
| - name: Setup Node.js | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| - name: Install Dependencies | |
| if: steps.changes.outputs.changed == 'true' | |
| run: pnpm install | |
| - name: Run E2E tests | |
| if: steps.changes.outputs.changed == 'true' | |
| run: node --run e2e | |
| - name: E2E reporter | |
| if: always() | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #https://github.com/actions/upload-artifact/releases/tag/v6.0.0 | |
| with: | |
| name: E2E-report-${{ matrix.os }} | |
| if-no-files-found: warn | |
| path: | | |
| e2e/playwright-report | |
| e2e/test-results | |
| - name: Run E2E type checker | |
| if: steps.changes.outputs.changed == 'true' | |
| run: cd e2e && node --run type-check |