diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index 245b136ee22c18..0de1b9ee6566ae 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -14,17 +14,13 @@ concurrency: jobs: checks: - name: Checks w/Node.js ${{ matrix.node.name }} on ${{ matrix.os }} + name: Checks w/Node.js ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} strategy: fail-fast: false matrix: - node: - - name: 20 - version: 20 - - name: 22 - version: 22.4 + node: ['20', '22'] os: ['macos-latest', 'ubuntu-latest', 'windows-latest'] steps: @@ -35,7 +31,7 @@ jobs: - name: Setup Node.js and install dependencies uses: ./.github/setup-node with: - node-version: ${{ matrix.node.version }} + node-version: ${{ matrix.node }} - name: Create block shell: bash diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 75a0d34ddc8d87..488f41c217e7c2 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -21,17 +21,13 @@ concurrency: jobs: unit-js: - name: JavaScript (Node.js ${{ matrix.node.name }}) ${{ matrix.shard }} + name: JavaScript (Node.js ${{ matrix.node }}) ${{ matrix.shard }} runs-on: ubuntu-latest if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} strategy: fail-fast: false matrix: - node: - - name: 20 - version: 20 - - name: 22 - version: 22.4 + node: ['20', '22'] shard: ['1/4', '2/4', '3/4', '4/4'] steps: @@ -43,7 +39,7 @@ jobs: - name: Setup Node.js and install dependencies uses: ./.github/setup-node with: - node-version: ${{ matrix.node.version }} + node-version: ${{ matrix.node }} - name: Determine the number of CPU cores uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0 @@ -64,17 +60,13 @@ jobs: --cacheDirectory="$HOME/.jest-cache" unit-js-date: - name: JavaScript Date Tests (Node.js ${{ matrix.node.name }}) + name: JavaScript Date Tests (Node.js ${{ matrix.node }}) runs-on: ubuntu-latest if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} strategy: fail-fast: false matrix: - node: - - name: 20 - version: 20 - - name: 22 - version: 22.4 + node: ['20', '22'] steps: - name: Checkout repository @@ -85,7 +77,7 @@ jobs: - name: Setup Node.js and install dependencies uses: ./.github/setup-node with: - node-version: ${{ matrix.node.version }} + node-version: ${{ matrix.node }} - name: Determine the number of CPU cores uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0