Skip to content

Commit 2070869

Browse files
authored
CI: Clean up Node.js installation in GitHub actions (#5322)
- Remove actions installing old Node.js versions no longer used (`14` and `16`) - Rename `latest` action to `active-lts` to clearly signal intent (a separate `latest` or `current` action that tests non-lts, can be created in a follow up commit) - Remove `18` action, and replace any usage of it with `oldest-maintenance-lts` - Remove `setup` action and replace any usage of it with `active-lts` - Move `install` action to after the first Node.js install action that actually needs it, instead of first installing one Node.js version, only to install another right after - Change any direct usage of `actions/setup-node` to use our own Node.js installation actions instead, when a matrix is not used.
1 parent 2c9ab13 commit 2070869

25 files changed

Lines changed: 121 additions & 201 deletions

File tree

.github/actions/node/14/action.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/actions/node/16/action.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/actions/node/18/action.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/actions/node/20/action.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Node.js Active LTS
2+
description: Install the current Active LTS version of Node.js
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: actions/setup-node@v4
7+
with:
8+
cache: yarn
9+
node-version: '22'

.github/actions/node/latest/action.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Node.js Newst Maintenance LTS
2+
description: Install the newest Maintenance LTS version of Node.js
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: actions/setup-node@v4
7+
with:
8+
cache: yarn
9+
node-version: '20'

.github/actions/node/setup/action.yml renamed to .github/actions/node/oldest-maintenance-lts/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Node Setup
2-
description: Install Node.js
1+
name: Node.js Oldest Maintenance LTS
2+
description: Install the oldest Maintenance LTS version of Node.js
33
runs:
44
using: composite
55
steps:

.github/actions/node/oldest/action.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/actions/plugins/test-and-upstream/action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ runs:
44
using: composite
55
steps:
66
- uses: ./.github/actions/testagent/start
7-
- uses: ./.github/actions/node/setup
7+
- uses: ./.github/actions/node/oldest-maintenance-lts
88
- uses: ./.github/actions/install
9-
- uses: ./.github/actions/node/oldest
109
- run: yarn test:plugins:ci
1110
shell: bash
1211
- run: yarn test:plugins:upstream
1312
shell: bash
14-
- uses: ./.github/actions/node/latest
13+
- uses: ./.github/actions/node/active-lts
1514
- run: yarn test:plugins:ci
1615
shell: bash
1716
- run: yarn test:plugins:upstream

0 commit comments

Comments
 (0)