Skip to content

Commit

Permalink
Bump all GithubAction workflows to use Node 22
Browse files Browse the repository at this point in the history
  • Loading branch information
shethj committed Feb 3, 2025
1 parent ce7a3e4 commit af0f76d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/actions/changelog-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
using: 'composite'
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history to access all commits

Expand Down
40 changes: 15 additions & 25 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@ jobs:
# Run one matrix env at a time because we need to deploy each app to MRT and run e2e tests there
max-parallel: 1
matrix:
node: [16, 18, 20, 22]
# Run all matrix env at once because we will not deploy demo app to MRT.
node: [18, 20, 22]
npm: [8, 9, 10, 11]
exclude: # node 16 with npm 10/11 and node 18 with npm 11 are not compatible
- node: 16
npm: 10
- node: 16
npm: 11
exclude: # node 18 with npm 11 is not compatible
- node: 18
npm: 11
runs-on: ubuntu-latest
Expand All @@ -73,7 +70,7 @@ jobs:
# For more: https://nodejs.org/en/download/releases/
# (We also use this env var for making sure a step runs once for the current node version)
# Note: For node 18, the default was npm 9 until v18.19.0, when it became npm 10
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
IS_DEFAULT_NPM: ${{ (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -159,13 +156,10 @@ jobs:
# Run one matrix env at a time because we need to deploy each app to MRT and run e2e tests there
max-parallel: 1
matrix:
node: [16, 18, 20, 22]
# Run all matrix env at once because we will not deploy demo app to MRT.
node: [18, 20, 22]
npm: [8, 9, 10, 11]
exclude: # node 16 with npm 10/11 and node 18 with npm 11 are not compatible
- node: 16
npm: 10
- node: 16
npm: 11
exclude: # node 18 with npm 11 is not compatible
- node: 18
npm: 11
runs-on: ubuntu-latest
Expand All @@ -174,7 +168,7 @@ jobs:
# For more: https://nodejs.org/en/download/releases/
# (We also use this env var for making sure a step runs once for the current node version)
# Note: For node 18, the default was npm 9 until v18.19.0, when it became npm 10
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
IS_DEFAULT_NPM: ${{ (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -258,23 +252,19 @@ jobs:
# Run one matrix env at a time because we need to deploy each app to MRT and run e2e tests there
max-parallel: 1
matrix:
# Run all matrix env at once because we will not deploy demo app to MRT.
node: [16, 18, 20, 22]
npm: [8, 9, 10, 11]
exclude: # node 16 with npm 10/11 and node 18 with npm 11 are not compatible
- node: 16
npm: 10
- node: 16
npm: 11
- node: 18
npm: 11
# Run all matrix env at once because we will not deploy demo app to MRT.
node: [18, 20, 22]
npm: [8, 9, 10, 11]
exclude: # node 18 with npm 11 is not compatible
- node: 18
npm: 11
runs-on: ubuntu-latest
env:
# The "default" npm is the one that ships with a given version of node.
# For more: https://nodejs.org/en/download/releases/
# (We also use this env var for making sure a step runs once for the current node version)
# Note: For node 18, the default was npm 9 until v18.19.0, when it became npm 10
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
IS_DEFAULT_NPM: ${{ (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Changelog Check
uses: ./.github/actions/changelog-check
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
# For more: https://nodejs.org/en/download/releases/
# (We also use this env var for making sure a step runs once for the current node version)
# Note: For node 18, the default was npm 9 until v18.19.0, when it became npm 10
IS_DEFAULT_NPM: ${{ (matrix.node == 16 && matrix.npm == 8) || (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
IS_DEFAULT_NPM: ${{ (matrix.node == 18 && matrix.npm == 10) || (matrix.node == 20 && matrix.npm == 10) || (matrix.node == 22 && matrix.npm == 10) }}
# The current recommended version for Managed Runtime:
# https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/upgrade-node-version.html
IS_MRT_NODE: ${{ matrix.node == 22 && matrix.npm == 10 }}
Expand Down Expand Up @@ -190,10 +190,10 @@ jobs:
PROJECT_DIR: generated-${{ matrix.template }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 22

Expand Down

0 comments on commit af0f76d

Please sign in to comment.