From 52d795bd6f75fc0d9b221ec6a466c14f3eb3e8b0 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Wed, 8 May 2024 17:03:51 +0200 Subject: [PATCH 1/2] move coverage to test_nightly as coverage doesnt depend on dependencies and test_latest takes forever Signed-off-by: Mikael Arguedas --- .github/workflows/test.yml | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 63f30df5..d2802484 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,29 +28,8 @@ jobs: sros2_cmake test_security extra-cmake-args: '-DSECURITY=ON --no-warn-unused-cli' - colcon-defaults: | - { - "build": { - "mixin": ["coverage-pytest"] - }, - "test": { - "mixin": ["coverage-pytest"] - } - } - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml target-ros2-distro: rolling vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/rolling') - with: - file: ros_ws/build/sros2/coverage.xml - flags: unittests - name: sros2-coverage - fail_ci_if_error: true - name: Upload Logs uses: actions/upload-artifact@v4 if: failure() @@ -74,9 +53,19 @@ jobs: - name: Build workspace run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon build - name: Test workspace - run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon test --executor sequential --event-handlers console_direct+ + run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon test --executor sequential --event-handlers console_direct+ --mixin coverage-pytest - name: Check test results run: colcon test-result + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/rolling') + with: + file: ros_ws/build/sros2/coverage.xml + flags: unittests + name: sros2-coverage + fail_ci_if_error: true - name: Upload Logs uses: actions/upload-artifact@v4 if: failure() From ab2066141ecc2382eb8bbd3d8b1b5a4adc88c403 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Wed, 8 May 2024 17:52:16 +0200 Subject: [PATCH 2/2] add mixins Signed-off-by: Mikael Arguedas adding to build for completeness but 0 impact on current issue Signed-off-by: Mikael Arguedas --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2802484..8b5ae8e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,8 +50,12 @@ jobs: . /opt/ros/$ROS_DISTRO/setup.sh rosdep update DEBIAN_FRONTEND=noninteractive rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_DISTRO + - name: Setup mixins + run: | + colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + colcon mixin update - name: Build workspace - run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon build + run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon build --mixin coverage-pytest - name: Test workspace run: . /opt/ros/$ROS_DISTRO/setup.sh && colcon test --executor sequential --event-handlers console_direct+ --mixin coverage-pytest - name: Check test results