Skip to content

Commit

Permalink
move coverage to test_nightly
Browse files Browse the repository at this point in the history
as coverage doesnt depend on dependencies and test_latest takes forever

Signed-off-by: Mikael Arguedas <[email protected]>
  • Loading branch information
mikaelarguedas committed May 8, 2024
1 parent 07608ab commit 52d795b
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 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 @@ -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()
Expand Down

0 comments on commit 52d795b

Please sign in to comment.