Skip to content

Commit

Permalink
Upgrade to Node.js v16 (#521)
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 authored Feb 14, 2023
1 parent cea5b36 commit b074834
Show file tree
Hide file tree
Showing 9 changed files with 11,966 additions and 13,929 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
43 changes: 20 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,32 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macOS-latest, windows-latest]
os:
- macOS-latest
- windows-latest
steps:
- 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: ./ # Uses an action in the root directory
- run: .github/workflows/check-environment.sh

test_environment_linux:
name: "Check development tools"
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
docker_image:
- "ubuntu:bionic"
- "ubuntu:focal"
- "ubuntu:jammy"
container:
image: ${{ matrix.docker_image }}
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- 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: ./ # Uses an action in the root directory
- run: .github/workflows/check-environment.sh
Expand All @@ -76,7 +75,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: ./ # Uses an action in the root directory
with:
Expand Down Expand Up @@ -142,7 +141,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: ./ # Uses an action in the root directory
with:
Expand All @@ -155,14 +154,12 @@ jobs:

test_multiple_ros_installations:
name: "ROS and ROS 2 Binary Install Test Suite (Linux only)"
runs-on: ubuntu-latest
container:
image: ubuntu:focal
runs-on: ubuntu-20.04
steps:
- 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: ./ # Uses an action in the root directory
with:
Expand All @@ -172,14 +169,12 @@ jobs:

test_repo_with_root_setup_cfg:
name: "Test with setup.cfg file in root directory (Linux only)"
runs-on: ubuntu-latest
container:
image: ubuntu:focal
runs-on: ubuntu-22.04
steps:
- 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
- run: cp .github/workflows/test_setup.cfg setup.cfg
- uses: ./ # Uses an action in the root directory
Expand All @@ -194,7 +189,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: ./

Expand All @@ -204,12 +199,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- 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: ./
with:
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.

## Install Dependencies

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ inputs:
required: false
default: ""
runs:
using: "node12"
using: "node16"
main: "dist/index.js"
Loading

0 comments on commit b074834

Please sign in to comment.