Skip to content

Commit

Permalink
🔨 Testing experimental code-coverage inclusive GitHub Action CI.
Browse files Browse the repository at this point in the history
Signed-off-by: Bey Hao Yun <[email protected]>
  • Loading branch information
cardboardcode committed Mar 17, 2024
1 parent 7131165 commit 29dcb4e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/industrial_ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,32 @@ jobs:
- uses: actions/checkout@v3
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}

- name: Install ROS 2 dependencies (modify as needed)
run: |
sudo apt update && sudo apt install -y \
python3-colcon-common-extensions \
python3-colcon-ridl \
python3-rclpy
- name: Setup ROS 2 environment (modify as needed)
run: |
source /opt/ros/humble/setup.bash
- name: Build your ROS 2 package (modify as needed)
run: |
colcon build --symlink-install --cmake-args \
-DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' \
-DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage'
- name: Run ROS 2 unit tests with coverage (modify as needed)
run: |
colcon lcov-result --initial && \
colcon test --packages-select virtual_camera
colcon lcov-result
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coveralls-file: ./lcov/total_coverage.info

0 comments on commit 29dcb4e

Please sign in to comment.