Skip to content

fix(core,dispatcher): fix cache_key NameError, fence stripping, and s… #49

fix(core,dispatcher): fix cache_key NameError, fence stripping, and s…

fix(core,dispatcher): fix cache_key NameError, fence stripping, and s… #49

name: Integration tests (ROS 2)
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: integration-${{ github.ref }}
cancel-in-progress: true
jobs:
integration:
name: ROS 2 ${{ matrix.ros_distro }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- ros_distro: humble
os: ubuntu-22.04
- ros_distro: jazzy
os: ubuntu-24.04
# Use the official ROS Docker image — it has everything pre-installed.
container:
image: ros:${{ matrix.ros_distro }}-ros-base
steps:
- uses: actions/checkout@v4
# colcon and pytest aren't in the base image.
- name: Install build and test tools
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
run: |
apt-get update -q
apt-get install -y --no-install-recommends \
python3-colcon-common-extensions \
python3-pytest \
python3-pytest-cov \
python3-pip
pip3 install pytest-timeout
- name: Install Python dependencies
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
run: |
pip3 install -e "ros2_lingua_core[dev]"
- name: Install ROS 2 package dependencies via rosdep
shell: bash
run: |
rosdep update --rosdistro ${{ matrix.ros_distro }}
rosdep install \
--from-paths . \
--ignore-src \
--rosdistro ${{ matrix.ros_distro }} \
-y
# Build all ROS 2 packages in the workspace.
- name: Build workspace
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
colcon build \
--symlink-install \
--cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo \
--event-handlers console_cohesion+
# Run the integration tests.
# colcon test respects package-level test targets (pytest via ament_cmake_pytest).
- name: Run integration tests
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
source install/setup.bash
colcon test \
--packages-select ros2_lingua ros2_lingua_cpp \
--event-handlers console_cohesion+ \
--return-code-on-test-failure
- name: Print detailed results
if: always()
shell: bash
run: |
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
colcon test-result --verbose
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: colcon-logs-${{ matrix.ros_distro }}
path: log/
retention-days: 5