Skip to content

Commit 9d3781c

Browse files
committed
GA actions configuration
1 parent 3e92b92 commit 9d3781c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

ci/script.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ run_python_core_tests() {
6262

6363
run_python_ros2_tests() {
6464
export PYTHONPATH=.
65+
if [ -n "${ROS_DISTRO:-}" ] && [ -f "/opt/ros/${ROS_DISTRO}/setup.bash" ]; then
66+
# setup-ros installs the ROS underlay but does not source it for our shell
67+
source "/opt/ros/${ROS_DISTRO}/setup.bash"
68+
elif [ -f "/opt/ros/jazzy/setup.bash" ]; then
69+
source "/opt/ros/jazzy/setup.bash"
70+
else
71+
echo "ROS2 environment setup script not found"
72+
exit 1
73+
fi
74+
75+
command -v ros2 >/dev/null
76+
command -v colcon >/dev/null
6577
python -W ignore test/test_ros2.py -v
6678
}
6779

0 commit comments

Comments
 (0)