Skip to content

Commit b2fd9f1

Browse files
committed
update smoke tests for a r2s seperate world
1 parent 8bb238e commit b2fd9f1

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/workflows/ros-tests.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ jobs:
5050
steps:
5151
- name: Checkout code
5252
uses: actions/checkout@v4
53+
with:
54+
path: greenwave_monitor
55+
56+
- name: Clone r2s_gw repository
57+
run: |
58+
# Try to clone the matching branch, fallback to main if it doesn't exist
59+
BRANCH_NAME="${{ github.ref_name }}"
60+
if git ls-remote --exit-code --heads https://github.com/NVIDIA-ISAAC-ROS/r2s_gw.git "$BRANCH_NAME" > /dev/null 2>&1; then
61+
echo "Cloning r2s_gw branch: $BRANCH_NAME"
62+
git clone --branch "$BRANCH_NAME" --depth 1 https://github.com/NVIDIA-ISAAC-ROS/r2s_gw.git r2s_gw
63+
else
64+
echo "Branch $BRANCH_NAME not found in r2s_gw, falling back to main"
65+
git clone --branch main --depth 1 https://github.com/NVIDIA-ISAAC-ROS/r2s_gw.git r2s_gw
66+
fi
67+
shell: bash
5368

5469
- name: Setup ROS repository and install rosdep
5570
run: |
@@ -69,16 +84,27 @@ jobs:
6984
run: |
7085
rosdep init
7186
rosdep update --include-eol-distros
72-
rosdep install --from-paths . --rosdistro ${{ matrix.ros_distro }} --ignore-src -r -y
87+
rosdep install --from-paths greenwave_monitor r2s_gw --rosdistro ${{ matrix.ros_distro }} --ignore-src -r -y
7388
shell: bash
7489
env:
7590
DEBIAN_FRONTEND: noninteractive
7691

92+
- name: Install Python dependencies
93+
run: |
94+
if [[ "${{ matrix.ros_distro }}" == "jazzy" || \
95+
"${{ matrix.ros_distro }}" == "kilted" || \
96+
"${{ matrix.ros_distro }}" == "rolling" ]]; then
97+
pip3 install --break-system-packages textual
98+
else
99+
pip3 install textual
100+
fi
101+
shell: bash
102+
77103
- name: Build packages
78104
run: |
79105
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
80106
echo "Building and testing on ROS2 ${{ matrix.ros_distro }}"
81-
colcon build --packages-up-to greenwave_monitor
107+
colcon build --packages-up-to r2s_gw
82108
shell: bash
83109

84110
- name: Smoke test README commands
@@ -87,6 +113,7 @@ jobs:
87113
source install/setup.bash
88114
set -e
89115
timeout 10s bash -lc "script -qfec 'ros2 run greenwave_monitor ncurses_dashboard' /dev/null <<< \$'q'" || true
116+
timeout 10s bash -lc "script -qfec 'ros2 run r2s_gw r2s_gw_dashboard' /dev/null <<< \$'q'" || true
90117
timeout 5s ros2 launch greenwave_monitor hz.launch.py topics:='["/topic1"]' || true
91118
shell: bash
92119

0 commit comments

Comments
 (0)