Skip to content

Commit

Permalink
Upgrade to Node.js v16 (#778)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
  • Loading branch information
christophebedard committed Feb 15, 2023
1 parent 27e0fd6 commit e9721b4
Show file tree
Hide file tree
Showing 9 changed files with 14,649 additions and 17,311 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ set -euxo pipefail

npm install -g codecov

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

npm ci
npm run build
npm test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
with:
node-version: "12.x"
node-version: "16.x"
- run: npm install && npm run lint
- run: npm run build && git diff --exit-code
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
with:
node-version: "12.x"
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./
id: action-ros-ci
Expand All @@ -82,7 +82,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
with:
node-version: "12.x"
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ros-tooling/setup-ros@master
with:
Expand All @@ -105,7 +105,7 @@ jobs:
needs: pre_condition
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@v0.3
- uses: ros-tooling/setup-ros@master
with:
required-ros-distributions: foxy
- uses: ./
Expand All @@ -120,7 +120,7 @@ jobs:
needs: pre_condition
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@v0.3
- uses: ros-tooling/setup-ros@master
with:
required-ros-distributions: foxy
# Skip installing test_depend dependency and verifies it isn't installed.
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
if: ${{ !github.event.repository.fork && !github.event.pull_request.head.repo.fork }}
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@v0.3
- uses: ros-tooling/setup-ros@master
with:
required-ros-distributions: foxy
- uses: ./
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
with:
node-version: "12.x"
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ./
name: "Test rosdep installs from correct distro"
Expand Down Expand Up @@ -245,9 +245,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
with:
node-version: "12.x"
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ros-tooling/setup-ros@v0.3
- uses: ros-tooling/setup-ros@master
- uses: ./
id: test_single_package
name: "Test single package, default options"
Expand Down Expand Up @@ -427,9 +427,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
with:
node-version: "12.x"
node-version: "16.x"
- run: .github/workflows/build-and-test.sh
- uses: ros-tooling/setup-ros@v0.3
- uses: ros-tooling/setup-ros@master
- uses: ./
id: test_single_package
name: "Test single package, default options"
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

We are currently using Node.js v12.
We are currently using Node.js v16.

## Build and test

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ outputs:
description: |
root directory name of the ROS workspace created for this CI code.
runs:
using: "node12"
using: "node16"
main: "dist/index.js"

0 comments on commit e9721b4

Please sign in to comment.