diff --git a/.github/workflows/coverage-build.yml b/.github/workflows/coverage-build.yml new file mode 100644 index 000000000..cf25b0fc0 --- /dev/null +++ b/.github/workflows/coverage-build.yml @@ -0,0 +1,53 @@ +name: Coverage Build +on: + pull_request: + branches: + - main + +jobs: + coverage: + name: coverage build + runs-on: ubuntu-22.04 + container: + image: ubuntu:noble + strategy: + fail-fast: false + env: + ROS_DISTRO: rolling + ros_version: 2 + steps: + - uses: ros-tooling/setup-ros@v0.7 + with: + required-ros-distributions: ${{ env.ROS_DISTRO }} + use-ros2-testing: true + - uses: actions/checkout@v5 + - uses: ros-tooling/action-ros-ci@v0.4 + with: + target-ros2-distro: ${{ env.ROS_DISTRO }} + # build all packages listed in the meta package + package-name: + ur_calibration + ur_controllers + ur_robot_driver + colcon-defaults: | + { + "build": { + "mixin": ["coverage-gcc", "coverage-pytest"] + }, + "test": { + "mixin": ["coverage-pytest"] + } + } + colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + skip-tests: false + - uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + file: ros_ws/lcov/total_coverage.info + flags: unittests + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + - uses: actions/upload-artifact@v5 + with: + name: colcon-logs-${{ matrix.os }} + path: ros_ws/log