Skip to content

Add system tests into CI #640

Add system tests into CI

Add system tests into CI #640

Workflow file for this run

name: build
on:
pull_request:
push:
branches: [ rolling ]
workflow_dispatch:
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 5 * * *'
defaults:
run:
shell: bash
jobs:
build_and_test:
name: build_and_test_${{ matrix.BUILD_TYPE }}_${{ matrix.ROS_DISTRO }}
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling, jazzy, iron]
BUILD_TYPE: [source, binary]
exclude:
- BUILD_TYPE: ${{ github.event_name == 'schedule' && 'source' || '' }}
env:
ROS2_REPOS_FILE_URL: 'https://raw.githubusercontent.com/ros2/ros2/${{ matrix.ROS_DISTRO }}/ros2.repos'
RMW_MIDDLEWARE_TEST_PACKAGES: 'test_rclcpp test_communication rcl'
runs-on: ubuntu-latest
container:
image: ${{ matrix.BUILD_TYPE == 'binary' && format('ros:{0}-ros-base', matrix.ROS_DISTRO) || 'ubuntu:noble' }}
steps:
- uses: ros-tooling/setup-ros@v0.7
if: ${{ matrix.BUILD_TYPE == 'source' }}
with:
use-ros2-testing: true
- name: Install Coverage Tools
if: ${{ matrix.BUILD_TYPE == 'binary' }}
run: sudo apt update && sudo apt install -y python3-colcon-coveragepy-result python3-colcon-lcov-result lcov
- name: Build and run tests
id: action-ros-ci
uses: ros-tooling/action-ros-ci@v0.3
with:
package-name: |
${{ matrix.BUILD_TYPE == 'source' && env.RMW_MIDDLEWARE_TEST_PACKAGES || '' }}
rmw_zenoh_cpp
zenoh_c_vendor
colcon-defaults: |
{
"build": {
"cmake-args": [
"-DSKIP_MULTI_RMW_TESTS=ON"
]
}
}
target-ros2-distro: ${{ matrix.ROS_DISTRO }}
vcs-repo-file-url: ${{ matrix.BUILD_TYPE == 'source' && env.ROS2_REPOS_FILE_URL || '' }}
skip-tests: true
- name: Run system_tests
if: ${{ matrix.BUILD_TYPE == 'source' }}
run: |
cd ${{ steps.action-ros-ci.outputs.ros-workspace-directory-name }}
. install/setup.sh
launch_test install/rmw_zenoh_cpp/test/rmw_zenoh_integration.test.py 'selected_system_tests:=${{ env.RMW_MIDDLEWARE_TEST_PACKAGES }}'
- uses: actions/upload-artifact@v3
if: ${{ matrix.BUILD_TYPE == 'source' }}
with:
name: colcon-logs-${{ matrix.ROS_DISTRO }}-latest
path: ${{ steps.action-ros-ci.outputs.ros-workspace-directory-name }}/log