ci-rsc #2622
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: ci-rsc | |
| permissions: {} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - 'packages/plugin-rsc/**' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/ci-rsc.yml' | |
| schedule: | |
| # Run daily at 00:00 UTC to test canary/experimental React versions | |
| - cron: '0 0 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - run: pnpm i | |
| - run: pnpm build | |
| - run: pnpm -C packages/plugin-rsc tsc | |
| - run: pnpm -C packages/plugin-rsc test | |
| test-e2e: | |
| name: test-rsc (${{ matrix.os }} / ${{ matrix.browser }}) ${{ matrix.vite && format('(vite-{0})', matrix.vite) || '' }} ${{ matrix.react_version && format('(react-{0})', matrix.react_version) || '' }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| browser: [chromium] | |
| vite: [''] | |
| react_version: [''] | |
| include: | |
| - os: ubuntu-latest | |
| browser: firefox | |
| - os: macos-latest | |
| browser: webkit | |
| - os: ubuntu-latest | |
| browser: chromium | |
| vite: 7 | |
| - os: ubuntu-latest | |
| browser: chromium | |
| react_version: canary | |
| - os: ubuntu-latest | |
| browser: chromium | |
| react_version: experimental | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - run: pnpm i | |
| - name: install react | |
| if: ${{ matrix.react_version }} | |
| run: | | |
| sed -i "/^overrides:/a\ react: \"$REACT_VERSION\"" pnpm-workspace.yaml | |
| sed -i "/^overrides:/a\ react-dom: \"$REACT_VERSION\"" pnpm-workspace.yaml | |
| sed -i "/^overrides:/a\ react-server-dom-webpack: \"$REACT_VERSION\"" pnpm-workspace.yaml | |
| pnpm i --no-frozen-lockfile | |
| env: | |
| REACT_VERSION: ${{ matrix.react_version }} | |
| - run: pnpm build | |
| - name: install vite ${{ matrix.vite }} | |
| if: ${{ matrix.vite }} | |
| run: | | |
| yq -i '.overrides.vite = "^${{ matrix.vite }}"' pnpm-workspace.yaml | |
| yq -i '.overrides."@vitejs/plugin-react" = "^5"' pnpm-workspace.yaml | |
| yq -i '.packages += ["!packages/plugin-react"]' pnpm-workspace.yaml | |
| pnpm i --no-frozen-lockfile | |
| - run: pnpm -C packages/plugin-rsc exec playwright install "$BROWSER_NAME" | |
| shell: bash | |
| env: | |
| BROWSER_NAME: ${{ matrix.browser }} | |
| - run: pnpm -C packages/plugin-rsc test-e2e-ci --project="$BROWSER_NAME" | |
| shell: bash | |
| env: | |
| BROWSER_NAME: ${{ matrix.browser }} | |
| - uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.os }}-${{ matrix.browser }}${{ matrix.vite && format('-vite-{0}', matrix.vite) || '' }}${{ matrix.react_version && format('-react-{0}', matrix.react_version) || '' }} | |
| path: | | |
| packages/plugin-rsc/test-results | |
| if-no-files-found: ignore |