Skip to content

Commit

Permalink
Added Github action (#48)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde authored Jun 14, 2024
1 parent 76cd650 commit 21b7b82
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/basic-build-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Basic Build Workflow

on:
push:
branches: [rolling]
pull_request:
types: [opened, reopened, synchronize]

jobs:
build-rolling:
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: osrf/ros2:testing
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create Workspace
run: |
mkdir src_tmp
mv `find -maxdepth 1 -not -name . -not -name src_tmp` src_tmp/
mv src_tmp/ src/
- name: Install Prerequisites
run: |
bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \
apt-get update && apt-get upgrade -y && rosdep update; \
rosdep install --from-paths src --ignore-src -y'
- name: Build Workspace
run: |
bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \
colcon build'
- name: Run Tests
run: |
bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \
colcon test; \
colcon test-result --verbose'
2 changes: 1 addition & 1 deletion test/test_joy_twist.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def setUp(self):
automatically_declare_parameters_from_overrides=True)
self.message_pump = launch_testing_ros.MessagePump(self.node, context=self.context)
self.pub = self.node.create_publisher(sensor_msgs.msg.Joy, 'joy', 1)
if not hasattr(self, "cmd_vel_msg_type"):
if not hasattr(self, 'cmd_vel_msg_type'):
self.cmd_vel_msg_type = geometry_msgs.msg.Twist
self.sub = self.node.create_subscription(self.cmd_vel_msg_type,
'cmd_vel', self.callback, 1)
Expand Down

0 comments on commit 21b7b82

Please sign in to comment.