diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0c68d5bf..a870853e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -18,7 +18,7 @@ permissions: {} jobs: test: - name: E2E - Node ${{ matrix.node }} / WP ${{ matrix.wp }} / Shard ${{ matrix.shard }}/4 + name: E2E - WP ${{ matrix.wp }} / Shard ${{ matrix.shard }}/4 runs-on: ubuntu-latest permissions: contents: read @@ -28,13 +28,9 @@ jobs: matrix: event: ['${{ github.event_name }}'] shard: [1, 2, 3, 4] - node: ['22', '24'] wp: ['6.2', '6.8', 'latest', 'trunk'] exclude: - # On PRs: only test Node 22 + WP latest and trunk for fast feedback - # On trunk: full matrix with node 24 and minimum WP version - - event: 'pull_request' - node: '24' + # On PRs: Skip minimum supported WP version for faster feedback - event: 'pull_request' wp: '6.2' @@ -47,9 +43,14 @@ jobs: - name: Setup Node.js uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: - node-version: ${{ matrix.node }} + node-version-file: '.nvmrc' cache: 'npm' + - name: Get Node.js version + id: node-version + run: | + echo "NODE_VERSION=$(node -v)" >> "$GITHUB_OUTPUT" + - name: Install dependencies run: | npm ci @@ -77,7 +78,7 @@ jobs: uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 if: ${{ !cancelled() }} with: - name: failures-artifacts--node${{ matrix.node }}-wp${{ matrix.wp }}-shard${{ matrix.shard }} + name: failures-artifacts--node${{ steps.node-version.outputs.NODE_VERSION }}-wp${{ matrix.wp }}-shard${{ matrix.shard }} path: artifacts/test-results if-no-files-found: ignore @@ -85,7 +86,7 @@ jobs: uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 if: ${{ !cancelled() }} with: - name: blob-reports--node${{ matrix.node }}-wp${{ matrix.wp }}-shard${{ matrix.shard }} + name: blob-reports--node${{ steps.node-version.outputs.NODE_VERSION }}-wp${{ matrix.wp }}-shard${{ matrix.shard }} path: blob-report if-no-files-found: ignore @@ -143,7 +144,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: - node-version: '22' + node-version-file: '.nvmrc' cache: 'npm' - name: Install dependencies