Skip to content

Commit

Permalink
chore: upgrade to node 20 (#4922)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois authored Oct 10, 2023
1 parent 4628d80 commit cd04f75
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 70 deletions.
32 changes: 32 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup nodejs'
description: 'Setup nodejs'
author: 'Talend'
secrets:
NPM_TOKEN:
description: 'The NPM token to use'
runs:
using: 'composite'
steps:
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
scope: '@talend'

- name: Install yarn
shell: bash
run: npm i -g yarn

- name: Get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
11 changes: 3 additions & 8 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"

- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Install Dependencies
run: yarn --frozen-lockfile

Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: Upgrade dependencies
run: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/design-system-component-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
- name: Use Node.js
uses: ./.github/actions/setup-node

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ jobs:
persist-credentials: false

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
check-latest: true
cache: "yarn"

uses: ./.github/actions/setup-node

- name: Download icons
run: npx @talend/figma-icons-downloader
env:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ jobs:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
check-latest: true
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"

uses: ./.github/actions/setup-node

- name: Install
run: yarn install --frozen-lockfile --ignore-scripts

Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/pr-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node


- name: Install and build playground
id: build
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
check-latest: true
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: Install
run: yarn install --frozen-lockfile
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/surge-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ jobs:
environment: pull_request_unsafe

steps:
- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18

- name: Push to surge
run: npx surge teardown ${{ github.event.pull_request.number }}.talend.surge.sh --token ${{ secrets.SURGE_TOKEN }}
- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Push to surge
run: npx surge teardown ${{ github.event.pull_request.number }}.talend.surge.sh --token ${{ secrets.SURGE_TOKEN }}
7 changes: 1 addition & 6 deletions .github/workflows/tests-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ jobs:
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: Install and tests
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/visual-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
cache: "yarn"
- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Install dependencies
run: yarn --frozen-lock
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/yarn-deduplicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ jobs:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
uses: ./.github/actions/setup-node

- name: yarn-deduplicate
id: deduplicate
Expand Down

0 comments on commit cd04f75

Please sign in to comment.