Skip to content

Commit 86183c7

Browse files
authored
ci: update to Node.js v18 (#5051)
* ci: update to Node.js v18 * ci: simplify preact test * ci: use Node.js v16 for preact
1 parent 61bdab0 commit 86183c7

File tree

5 files changed

+21
-26
lines changed

5 files changed

+21
-26
lines changed

.github/actions/prepare/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ inputs:
33
description: 'Whether to minify the bundle'
44
required: false
55
default: 'false'
6+
node-version:
7+
description: 'The version of Node.js to use'
8+
required: false
9+
default: '18.x'
610

711
runs:
812
using: composite
913
steps:
1014
- uses: actions/setup-node@v3
1115
with:
12-
node-version: 16.x
16+
node-version: ${{ inputs.node-version }}
1317
check-latest: true
1418

1519
#region Build the standard bundle

.github/workflows/e2e-preact-cli-workflow.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,24 @@ jobs:
2020
- uses: actions/checkout@v3
2121

2222
- uses: ./.github/actions/prepare
23+
with:
24+
# Remove when Preact CLI supports Node.js 18
25+
node-version: 16.x
2326

2427
- name: 'Running the integration test'
2528
run: |
2629
source scripts/e2e-setup-ci.sh
27-
git clone https://github.com/preactjs-templates/default.git default
28-
cd default/template
29-
touch yarn.lock
30-
echo $(cat package.json | jq '.name = "pnp-test"') > package.json
31-
yarn
30+
31+
yarn dlx preact-cli create default default-app --yarn
32+
cd default-app
3233
yarn build
3334
3435
- name: 'Running the TypeScript integration test'
3536
run: |
3637
source scripts/e2e-setup-ci.sh
37-
git clone https://github.com/preactjs-templates/typescript.git default
38-
cd default/template
39-
40-
# TODO: Remove once https://github.com/preactjs-templates/typescript/issues/71 is fixed
41-
rm -rf tests
4238
43-
touch yarn.lock
44-
echo $(cat package.json | jq '.name = "pnp-test"') > package.json
45-
yarn
39+
yarn dlx preact-cli create typescript ts-app --yarn
40+
cd ts-app
4641
yarn build
4742
if: |
4843
success() || failure()

.github/workflows/integration-workflow.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ jobs:
2323
- run: |
2424
git fetch --no-tags --unshallow origin HEAD master
2525
26-
- name: 'Use Node.js 16.x'
27-
uses: actions/setup-node@v3
26+
- uses: actions/setup-node@v3
2827
with:
29-
node-version: 16.x
28+
node-version: 18.x
3029

3130
- name: 'Check that the Yarn files don''t change on new installs (fix w/ "yarn install")'
3231
run: |
@@ -151,10 +150,9 @@ jobs:
151150
steps:
152151
- uses: actions/checkout@v3
153152

154-
- name: 'Use Node.js 16.x'
155-
uses: actions/setup-node@v3
153+
- uses: actions/setup-node@v3
156154
with:
157-
node-version: 16.x
155+
node-version: 18.x
158156

159157
- name: 'Build bundle & plugins'
160158
run: |

.github/workflows/release-candidate.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ jobs:
2424
- name: 'Retrieve all the relevant tags'
2525
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2626

27-
- name: 'Use Node.js 16.x'
28-
uses: actions/setup-node@v3
27+
- uses: actions/setup-node@v3
2928
with:
30-
node-version: 16.x
29+
node-version: 18.x
3130

3231
- name: 'Build a binary for convenience'
3332
run: |

.github/workflows/sherlock-workflow.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12-
- name: 'Install Node'
13-
uses: actions/setup-node@v3
12+
- uses: actions/setup-node@v3
1413
with:
15-
node-version: 14.x
14+
node-version: 18.x
1615

1716
- name: 'Always use the latest sherlock'
1817
run: |

0 commit comments

Comments
 (0)