Skip to content

Merge branch 'feature/ci-action' #9

Merge branch 'feature/ci-action'

Merge branch 'feature/ci-action' #9

Workflow file for this run

# From https://github.com/marketplace/actions/ros-2-ci-action
name: CI Action
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
ROS_DISTRO: humble
jobs:
ci-action:
runs-on: ubuntu-latest
steps:
- name: Install ROS2 and dependencies
uses: ros-tooling/[email protected]
with:
required-ros-distro: ${{ env.ROS_DISTRO }}
- name: Build and Run Tests
uses: ros-tooling/[email protected]
id: action_ros_ci_step
with:
package-name: vortex-m3-sonar-driver
target-ros2-distro: ${{ env.ROS_DISTRO }}
colcon-defaults: |
{
"build": {
"mixin": ["coverage-gcc", "coverage-pytest"]
},
"test": {
"mixin": ["coverage-pytest"]
}
}
- name: Upload Code Coverage Info
uses: codecov/[email protected]
with:
# token: ${{ secrets.CODECOV_TOKEN }} # only needed for private repos
files: ros_ws/lcov/total_coverage.info,ros_ws/coveragepy/.coverage
flags: unittests
name: codecov-umbrella
- name: Upload Test Results as Artifact
uses: actions/upload-artifact@v1
with:
name: colcon-logs
path: ${{ steps.action_ros_ci_step.outputs.ros-workspace-directory-name }}/log
if: always() # upload the logs even when the build fails