Skip to content

Commit

Permalink
Downgrade node 22(.5) unit tests to 22.4 (WordPress#63728)
Browse files Browse the repository at this point in the history
* Downgrade node 22 unit tests to 22.4 until npm/cli#7657 is fixed

* try again

* Try using a stable name for the tests so that required jobs do not require an update
  • Loading branch information
talldan authored Jul 19, 2024
1 parent 0a7e10d commit 32b4b2e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ concurrency:

jobs:
checks:
name: Checks w/Node.js ${{ matrix.node }} on ${{ matrix.os }}
name: Checks w/Node.js ${{ matrix.node.name }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
node: ['20', '22']
node:
- name: 20
version: 20
- name: 22
version: 22.4
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']

steps:
Expand All @@ -31,7 +35,7 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node.version }}

- name: Create block
shell: bash
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ concurrency:

jobs:
unit-js:
name: JavaScript (Node.js ${{ matrix.node }}) ${{ matrix.shard }}
name: JavaScript (Node.js ${{ matrix.node.name }}) ${{ matrix.shard }}
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
node: ['20', '22']
node:
- name: 20
version: 20
- name: 22
version: 22.4
shard: ['1/4', '2/4', '3/4', '4/4']

steps:
Expand All @@ -39,7 +43,7 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node.version }}

- name: Determine the number of CPU cores
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
Expand All @@ -60,13 +64,17 @@ jobs:
--cacheDirectory="$HOME/.jest-cache"
unit-js-date:
name: JavaScript Date Tests (Node.js ${{ matrix.node }})
name: JavaScript Date Tests (Node.js ${{ matrix.node.name }})
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
node: ['20', '22']
node:
- name: 20
version: 20
- name: 22
version: 22.4

steps:
- name: Checkout repository
Expand All @@ -77,7 +85,7 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node.version }}

- name: Determine the number of CPU cores
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
Expand Down

0 comments on commit 32b4b2e

Please sign in to comment.