From 1721253dc57b587be197fe77cac792d36c164704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=B3=C5=82kowski?= Date: Thu, 5 May 2022 08:04:47 +0200 Subject: [PATCH] Build Tools: Update actions/setup-node GitHub action (#40816) * Build Tools: Update actions/setup-node GitHub action * Update two more occurrences of hardcoded Node version --- .github/workflows/build-plugin-zip.yml | 8 ++++---- .github/workflows/bundle-size.yml | 7 ++----- .github/workflows/create-block.yml | 2 +- .github/workflows/end2end-test-playwright.yml | 6 ++---- .github/workflows/end2end-test.yml | 5 ++--- .github/workflows/flaky-tests.yml | 4 ++-- .github/workflows/performance.yml | 4 ++-- .github/workflows/pull-request-automation.yml | 2 +- .github/workflows/rnmobile-android-runner.yml | 5 ++--- .github/workflows/rnmobile-ios-runner.yml | 5 ++--- .github/workflows/static-checks.yml | 4 ++-- .github/workflows/storybook-pages.yml | 7 ++----- .github/workflows/unit-test.yml | 10 +++++----- 13 files changed, 29 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index 68b9ca7a9e2478..dd434703d3049f 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -169,9 +169,9 @@ jobs: ref: ${{ needs.bump-version.outputs.release_branch || github.ref }} - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: 14 + node-version-file: '.nvmrc' cache: npm - name: Build Gutenberg plugin ZIP file @@ -326,9 +326,9 @@ jobs: git config user.email gutenberg@wordpress.org - name: Setup Node - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: 14 + node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Publish packages to npm ("latest" dist-tag) diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml index 507bec367f6218..d2b1298e484bbc 100644 --- a/.github/workflows/bundle-size.yml +++ b/.github/workflows/bundle-size.yml @@ -35,9 +35,6 @@ jobs: build: name: Check runs-on: ubuntu-latest - strategy: - matrix: - node: ['14'] steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 @@ -45,9 +42,9 @@ jobs: fetch-depth: 1 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: ${{ matrix.node }} + node-version-file: '.nvmrc' cache: npm - uses: preactjs/compressed-size-action@df6e03e187079aef959a2878311639c77b95ee2e # v2.2.0 diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index 0dbff63401f490..012ada8d05f149 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: node-version: ${{ matrix.node }} cache: npm diff --git a/.github/workflows/end2end-test-playwright.yml b/.github/workflows/end2end-test-playwright.yml index 317eb61329a594..8ab3b9a22966f6 100644 --- a/.github/workflows/end2end-test-playwright.yml +++ b/.github/workflows/end2end-test-playwright.yml @@ -22,16 +22,14 @@ jobs: if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} strategy: fail-fast: false - matrix: - node: ['14'] steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: ${{ matrix.node }} + node-version-file: '.nvmrc' cache: npm - name: Npm install and build diff --git a/.github/workflows/end2end-test.yml b/.github/workflows/end2end-test.yml index a6e06ee05429cf..e8e140bcd0e776 100644 --- a/.github/workflows/end2end-test.yml +++ b/.github/workflows/end2end-test.yml @@ -24,15 +24,14 @@ jobs: fail-fast: false matrix: part: [1, 2, 3, 4] - node: ['14'] steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: ${{ matrix.node }} + node-version-file: '.nvmrc' cache: npm - name: Npm install and build diff --git a/.github/workflows/flaky-tests.yml b/.github/workflows/flaky-tests.yml index 9d195ba7657de5..1efe37a3d72ae9 100644 --- a/.github/workflows/flaky-tests.yml +++ b/.github/workflows/flaky-tests.yml @@ -15,9 +15,9 @@ jobs: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: 14 + node-version-file: '.nvmrc' cache: npm - name: Npm install diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 99a8aea9b7979d..2efa28a0fb736a 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -24,9 +24,9 @@ jobs: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: 14 + node-version-file: '.nvmrc' cache: npm - name: Npm install diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index 064a4380707dbe..5337acc848134c 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -20,7 +20,7 @@ jobs: ref: trunk - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index e990398098764a..4de748dfa42a13 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -19,7 +19,6 @@ jobs: strategy: matrix: native-test-name: [gutenberg-editor-initial-html] - node: ['14'] steps: - name: checkout @@ -33,9 +32,9 @@ jobs: cache: 'gradle' - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: ${{ matrix.node }} + node-version-file: '.nvmrc' cache: npm - run: npm ci diff --git a/.github/workflows/rnmobile-ios-runner.yml b/.github/workflows/rnmobile-ios-runner.yml index 1c520f3e369127..09f623766fb297 100644 --- a/.github/workflows/rnmobile-ios-runner.yml +++ b/.github/workflows/rnmobile-ios-runner.yml @@ -21,15 +21,14 @@ jobs: xcode: ['13.0'] device: ['iPhone 11'] native-test-name: [gutenberg-editor-initial-html] - node: ['14'] steps: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: ${{ matrix.node }} + node-version-file: '.nvmrc' cache: npm - run: npm ci diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index f5987cf25d0d4d..e6aaaeaa06bfa9 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -25,9 +25,9 @@ jobs: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: 14 + node-version-file: '.nvmrc' cache: npm - name: Npm install diff --git a/.github/workflows/storybook-pages.yml b/.github/workflows/storybook-pages.yml index f0f27589660a0c..6efe56a8891f6e 100644 --- a/.github/workflows/storybook-pages.yml +++ b/.github/workflows/storybook-pages.yml @@ -9,9 +9,6 @@ jobs: deploy: runs-on: ubuntu-latest if: ${{ github.repository == 'WordPress/gutenberg' }} - strategy: - matrix: - node: ['14'] steps: - name: Checkout @@ -20,9 +17,9 @@ jobs: ref: trunk - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: ${{ matrix.node }} + node-version-file: '.nvmrc' cache: npm - name: Install Dependencies diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 5371889620f363..786272b4e29e44 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: node-version: ${{ matrix.node }} cache: npm @@ -60,9 +60,9 @@ jobs: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: 14 + node-version-file: '.nvmrc' cache: npm - name: Npm install and build @@ -94,9 +94,9 @@ jobs: - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Use desired version of NodeJS - uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f # v2.2.2 + uses: actions/setup-node@5b52f097d36d4b0b2f94ed6de710023fbb8b2236 # v3.1.0 with: - node-version: 14 + node-version-file: '.nvmrc' cache: npm - name: Npm install and build