-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update travis configuration to use docker to test the module in xenial.
- Loading branch information
Showing
8 changed files
with
79 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,17 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.12" | ||
- "4" | ||
env: | ||
- ROS_DISTRO=hydro | ||
dist: xenial | ||
services: | ||
- docker | ||
|
||
before_install: | ||
# ROS deps for examples | ||
- sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' | ||
- wget http://packages.ros.org/ros.key -O - | sudo apt-key add - | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq ros-$ROS_DISTRO-ros ros-$ROS_DISTRO-catkin python-catkin-pkg python-rosdep | ||
- sudo apt-get install -qq ros-$ROS_DISTRO-rosbridge-server ros-$ROS_DISTRO-tf2-web-republisher ros-$ROS_DISTRO-common-tutorials ros-$ROS_DISTRO-rospy-tutorials ros-$ROS_DISTRO-actionlib-tutorials | ||
sudo: required | ||
|
||
# Only update npm in the 0.8 and 0.10 versions to not run into this issue: | ||
# https://github.com/nodejs/node/issues/433 | ||
- case ${TRAVIS_NODE_VERSION} in 0.8*|0.10*) npm update -g npm ;; esac | ||
notifications: | ||
email: | ||
on_success: always | ||
on_failure: always | ||
|
||
# Set up Xfvb for Firefox headless testing | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" | ||
before_script: | ||
- source /opt/ros/$ROS_DISTRO/setup.bash | ||
- sh test/examples/setup_examples.sh | ||
before_install: | ||
# ROS deps for examples | ||
- sudo docker pull ros:kinetic-ros-core | ||
- sudo docker build -t roslibjsdocker . | ||
script: | ||
- rostopic list | ||
- npm test | ||
- npm run test-examples | ||
- sudo docker run -v $(pwd):/root/roslibjs --rm roslibjsdocker bash -i -c 'bash /root/roslibjs/test/build.bash' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM ros:kinetic-ros-core | ||
|
||
ENV ROS_DISTRO=kinetic | ||
# Dependencies for rosbridge | ||
RUN apt update && apt-get install -y xvfb firefox git wget ros-$ROS_DISTRO-rosbridge-server ros-$ROS_DISTRO-tf2-web-republisher ros-$ROS_DISTRO-common-tutorials ros-$ROS_DISTRO-rospy-tutorials ros-$ROS_DISTRO-actionlib-tutorials | ||
|
||
# Install nvm, Node.js and node-gyp | ||
ENV NODE_VERSION v4.2.6 | ||
RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash \ | ||
&& . $HOME/.nvm/nvm.sh \ | ||
&& nvm install $NODE_VERSION && nvm alias default $NODE_VERSION \ | ||
&& npm install -g node-gyp | ||
|
||
RUN echo "source /opt/ros/kinetic/setup.bash" >> $HOME/.bashrc | ||
ENV PATH /bin/versions/node/$NODE_VERSION/bin:$PATH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2017 Intel Corporation. All rights reserved. | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -e | ||
|
||
pushd $(dirname $0) > /dev/null | ||
|
||
# Set up Xfvb for Firefox headless testing | ||
#export DISPLAY=:99.0 | ||
#sh -e /etc/init.d/xvfb start | ||
#Xvfb :99 -ac & | ||
|
||
source /opt/ros/kinetic/setup.bash | ||
sh examples/setup_examples.sh | ||
|
||
rostopic list | ||
npm install | ||
npm run test-examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters