From 947cc7bcbed266c3420003df13d5060b56ded819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 29 Oct 2024 16:08:31 +0100 Subject: [PATCH] ci: run unit tests for ros translation node --- .github/workflows/ros_translation_node.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ros_translation_node.yml diff --git a/.github/workflows/ros_translation_node.yml b/.github/workflows/ros_translation_node.yml new file mode 100644 index 0000000000..877233349f --- /dev/null +++ b/.github/workflows/ros_translation_node.yml @@ -0,0 +1,34 @@ +name: ROS translation node tests +on: + push: + branches: + - 'main' + pull_request: + branches: + - '*' +defaults: + run: + shell: bash +jobs: + build_and_test: + name: Build and test + runs-on: ubuntu-latest + container: + image: rostooling/setup-ros-docker:ubuntu-jammy-latest + steps: + - name: Setup ROS 2 + uses: ros-tooling/setup-ros@v0.7 + with: + required-ros-distributions: humble + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Build and test + run: | + ros_ws=/ros_ws + mkdir -p $ros_ws/src + ./Tools/copy_to_ros_ws.sh $ros_ws + cd $ros_ws + source /opt/ros/humble/setup.sh + colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install --event-handlers=console_cohesion+ + ./build/translation_node/translation_node_unit_tests