Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move coverage to test_nightly #304

Draft
wants to merge 2 commits into
base: rolling
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -71,12 +50,26 @@ 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+
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()
Expand Down
Loading