-
Notifications
You must be signed in to change notification settings - Fork 76
74 lines (66 loc) · 2.5 KB
/
node.js.yml
File metadata and controls
74 lines (66 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ devel ]
pull_request:
branches: [ devel ]
env:
ROS_DISTRO: melodic
ROSINSTALL_FILE: $GITHUB_PATH/dependencies.rosinstall
CATKIN_OPTIONS: $GITHUB_PATH/catkin.options
ROS_PARALLEL_JOBS: '-j8 -l6'
# Set the python path manually to include /usr/-/python2.7/dist-packages
# as this is where apt-get installs python packages.
PYTHONPATH: $PYTHONPATH:/usr/lib/python2.7/dist-
jobs:
build:
runs-on: ubuntu-18.04
container: ros:melodic
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
# cache: 'npm' unable to cache without package-lock
# Create a catkin workspace with the package under integration.
- name: Initialize workspace
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
source devel/setup.bash
- name: install message packages
run: |
git clone https://github.com/ros/std_msgs.git src/std_msgs
git clone https://github.com/ros/common_msgs src/common_msgs
git clone https://github.com/RethinkRobotics-opensource/test_msgs.git src/test_msgs
git clone https://github.com/ros/ros_comm_msgs.git src/ros_comm_msgs
# # Install all dependencies, using wstool first and rosdep second.
# # wstool looks for a ROSINSTALL_FILE defined in the environment variables.
# - run: cd ~/catkin_ws/src
# - run: wstool init
# - run: if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
# - run: wstool up
# # package dependencies: install using rosdep.
- name: generate messages and test
run: |
cd ~/catkin_ws
source devel/setup.bash
cd $GITHUB_WORKSPACE
npm install
npm run compile
npm run generate
npm test