Skip to content

Commit b074834

Browse files
Upgrade to Node.js v16 (#521)
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai> Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
1 parent cea5b36 commit b074834

9 files changed

Lines changed: 11966 additions & 13929 deletions

File tree

.github/workflows/build-and-test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ set -euxo pipefail
33

44
npm install -g codecov
55

6+
# When running inside a Docker container, by default, we're root and all files belond to root.
7+
# However, calling the npm scripts (build, etc.) with 'npm run ...' runs the commands as user
8+
# ID=1001, which means we can't open or write to any files. Therefore, if we're in Docker, chown
9+
# everything under /__w (which is the workspace directory on the host: /home/runner/work) to user
10+
# ID=1001. See:
11+
# * https://github.com/ros-tooling/setup-ros/pull/521
12+
# * https://github.com/npm/cli/issues/4589
13+
docker_workdir="/__w"
14+
if [ -d "${docker_workdir}" ]; then
15+
chown -R 1001:1001 "${docker_workdir}"
16+
fi
17+
618
npm ci
719
npm run build
820
npm test

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-node@v3.6.0
1616
with:
17-
node-version: "12.x"
17+
node-version: "16.x"
1818
- run: npm install && npm run lint
1919
- run: npm run build && git diff --exit-code

.github/workflows/test.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,32 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
os: [macOS-latest, windows-latest]
26+
os:
27+
- macOS-latest
28+
- windows-latest
2729
steps:
2830
- uses: actions/checkout@v3
2931
- uses: actions/setup-node@v3.6.0
3032
with:
31-
node-version: "12.x"
33+
node-version: "16.x"
3234
- run: .github/workflows/build-and-test.sh
3335
- uses: ./ # Uses an action in the root directory
3436
- run: .github/workflows/check-environment.sh
3537

3638
test_environment_linux:
3739
name: "Check development tools"
38-
runs-on: ubuntu-latest
40+
runs-on: ${{ matrix.os }}
3941
strategy:
4042
fail-fast: false
4143
matrix:
42-
docker_image:
43-
- "ubuntu:bionic"
44-
- "ubuntu:focal"
45-
- "ubuntu:jammy"
46-
container:
47-
image: ${{ matrix.docker_image }}
44+
os:
45+
- ubuntu-20.04
46+
- ubuntu-22.04
4847
steps:
4948
- uses: actions/checkout@v3
5049
- uses: actions/setup-node@v3.6.0
5150
with:
52-
node-version: "12.x"
51+
node-version: "16.x"
5352
- run: .github/workflows/build-and-test.sh
5453
- uses: ./ # Uses an action in the root directory
5554
- run: .github/workflows/check-environment.sh
@@ -76,7 +75,7 @@ jobs:
7675
- uses: actions/checkout@v3
7776
- uses: actions/setup-node@v3.6.0
7877
with:
79-
node-version: "12.x"
78+
node-version: "16.x"
8079
- run: .github/workflows/build-and-test.sh
8180
- uses: ./ # Uses an action in the root directory
8281
with:
@@ -142,7 +141,7 @@ jobs:
142141
- uses: actions/checkout@v3
143142
- uses: actions/setup-node@v3.6.0
144143
with:
145-
node-version: "12.x"
144+
node-version: "16.x"
146145
- run: .github/workflows/build-and-test.sh
147146
- uses: ./ # Uses an action in the root directory
148147
with:
@@ -155,14 +154,12 @@ jobs:
155154

156155
test_multiple_ros_installations:
157156
name: "ROS and ROS 2 Binary Install Test Suite (Linux only)"
158-
runs-on: ubuntu-latest
159-
container:
160-
image: ubuntu:focal
157+
runs-on: ubuntu-20.04
161158
steps:
162159
- uses: actions/checkout@v3
163160
- uses: actions/setup-node@v3.6.0
164161
with:
165-
node-version: "12.x"
162+
node-version: "16.x"
166163
- run: .github/workflows/build-and-test.sh
167164
- uses: ./ # Uses an action in the root directory
168165
with:
@@ -172,14 +169,12 @@ jobs:
172169

173170
test_repo_with_root_setup_cfg:
174171
name: "Test with setup.cfg file in root directory (Linux only)"
175-
runs-on: ubuntu-latest
176-
container:
177-
image: ubuntu:focal
172+
runs-on: ubuntu-22.04
178173
steps:
179174
- uses: actions/checkout@v3
180175
- uses: actions/setup-node@v3.6.0
181176
with:
182-
node-version: "12.x"
177+
node-version: "16.x"
183178
- run: .github/workflows/build-and-test.sh
184179
- run: cp .github/workflows/test_setup.cfg setup.cfg
185180
- uses: ./ # Uses an action in the root directory
@@ -194,7 +189,7 @@ jobs:
194189
- uses: actions/checkout@v3
195190
- uses: actions/setup-node@v3.6.0
196191
with:
197-
node-version: "12.x"
192+
node-version: "16.x"
198193
- run: .github/workflows/build-and-test.sh
199194
- uses: ./
200195

@@ -204,12 +199,14 @@ jobs:
204199
strategy:
205200
fail-fast: false
206201
matrix:
207-
os: [ubuntu-20.04, ubuntu-22.04]
202+
os:
203+
- ubuntu-20.04
204+
- ubuntu-22.04
208205
steps:
209206
- uses: actions/checkout@v3
210207
- uses: actions/setup-node@v3.6.0
211208
with:
212-
node-version: "12.x"
209+
node-version: "16.x"
213210
- run: .github/workflows/build-and-test.sh
214211
- uses: ./
215212
with:

DEVELOPING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Install [Node.js](https://nodejs.org/en/download/).
66

7-
We are currently using Node.js v12.
7+
We are currently using Node.js v16.
88

99
## Install Dependencies
1010

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ inputs:
3737
required: false
3838
default: ""
3939
runs:
40-
using: "node12"
40+
using: "node16"
4141
main: "dist/index.js"

0 commit comments

Comments
 (0)