refactor(workflows): no longer uesed merge-group trigger #3782
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: E2E | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/**' | |
| - 'examples/**' | |
| - 'e2e/**' | |
| - '.github/workflows/e2e.yml' | |
| - 'pnpm-lock.yaml' | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths: | |
| - 'packages/**' | |
| - 'examples/**' | |
| - 'e2e/**' | |
| - '.github/workflows/e2e.yml' | |
| - 'pnpm-lock.yaml' | |
| workflow_call: | |
| inputs: | |
| ref: | |
| required: true | |
| type: string | |
| react_version: | |
| required: true | |
| type: string | |
| workflow_dispatch: | |
| inputs: | |
| react_version: | |
| required: true | |
| type: string | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.react_version }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ inputs.ref || '' }} | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| cache: ${{ !inputs.react_version && 'pnpm' || '' }} | |
| - if: ${{ inputs.react_version }} | |
| env: | |
| REACT_VERSION: ${{ inputs.react_version }} | |
| run: | | |
| yq eval -i '.overrides |= (.react = strenv(REACT_VERSION) | .["react-dom"] = strenv(REACT_VERSION) | .["react-server-dom-webpack"] = strenv(REACT_VERSION))' pnpm-workspace.yaml | |
| pnpm install --no-frozen-lockfile | |
| - run: pnpm install | |
| - run: pnpm run compile | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: create-waku | |
| path: | | |
| packages/create-waku | |
| !packages/create-waku/node_modules | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: waku | |
| path: | | |
| packages/waku | |
| !packages/waku/node_modules | |
| if-no-files-found: error | |
| e2e: | |
| name: E2E on ${{ matrix.os }} (Node ${{ matrix.version }}) - (${{ matrix.shared }}/4)${{ inputs.react_version && format(' with react@{0}', inputs.react_version) || '' }} | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shared: [1, 2, 3, 4] | |
| shardTotal: [4] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| version: [26.0.0, 24.0.0, 22.13.0] | |
| exclude: | |
| - os: macos-latest | |
| version: 24.0.0 | |
| - os: windows-latest | |
| version: 24.0.0 | |
| - os: macos-latest | |
| version: 22.13.0 | |
| - os: windows-latest | |
| version: 22.13.0 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ inputs.ref || '' }} | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ matrix.version }} | |
| cache: ${{ !inputs.react_version && 'pnpm' || '' }} | |
| - if: runner.os == 'Windows' | |
| run: choco install yq -y | |
| - if: ${{ inputs.react_version }} | |
| env: | |
| REACT_VERSION: ${{ inputs.react_version }} | |
| run: | | |
| yq eval -i '.overrides |= (.react = strenv(REACT_VERSION) | .["react-dom"] = strenv(REACT_VERSION) | .["react-server-dom-webpack"] = strenv(REACT_VERSION))' pnpm-workspace.yaml | |
| pnpm install --no-frozen-lockfile | |
| - run: pnpm install | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: create-waku | |
| path: packages/create-waku | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: waku | |
| path: packages/waku | |
| - name: Install Playwright | |
| id: install-playwright | |
| uses: ./.github/actions/playwright | |
| - run: pnpm exec playwright test --shard=$SHARD/$SHARD_TOTAL | |
| shell: bash | |
| timeout-minutes: 30 | |
| env: | |
| SHARD: ${{ matrix.shared }} | |
| SHARD_TOTAL: ${{ matrix.shardTotal }} | |
| TEMP_DIR: ${{ runner.temp }} | |
| VITE_EXPERIMENTAL_WAKU_ROUTER: true | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: failure() | |
| with: | |
| name: playwright-report-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.shared }} | |
| path: test-results/ | |
| retention-days: 30 | |
| if-no-files-found: ignore | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: failure() | |
| with: | |
| name: output-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.shared }} | |
| path: | | |
| **/dist | |
| **/node_modules/.vite | |
| !**/node_modules | |
| retention-days: 30 | |
| if-no-files-found: ignore |