Skip to content

Commit 29dcb4e

Browse files
committed
🔨 Testing experimental code-coverage inclusive GitHub Action CI.
Signed-off-by: Bey Hao Yun <beyhy94@gmail.com>
1 parent 7131165 commit 29dcb4e

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/industrial_ci_action.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,32 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- uses: 'ros-industrial/industrial_ci@master'
1616
env: ${{matrix.env}}
17+
18+
- name: Install ROS 2 dependencies (modify as needed)
19+
run: |
20+
sudo apt update && sudo apt install -y \
21+
python3-colcon-common-extensions \
22+
python3-colcon-ridl \
23+
python3-rclpy
24+
25+
- name: Setup ROS 2 environment (modify as needed)
26+
run: |
27+
source /opt/ros/humble/setup.bash
28+
29+
- name: Build your ROS 2 package (modify as needed)
30+
run: |
31+
colcon build --symlink-install --cmake-args \
32+
-DCMAKE_CXX_FLAGS='-fprofile-arcs -ftest-coverage' \
33+
-DCMAKE_C_FLAGS='-fprofile-arcs -ftest-coverage'
34+
35+
- name: Run ROS 2 unit tests with coverage (modify as needed)
36+
run: |
37+
colcon lcov-result --initial && \
38+
colcon test --packages-select virtual_camera
39+
colcon lcov-result
40+
41+
- name: Coveralls GitHub Action
42+
uses: coverallsapp/github-action@v2.2.3
43+
with:
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
45+
coveralls-file: ./lcov/total_coverage.info

0 commit comments

Comments
 (0)