Skip to content

Commit b7cedd9

Browse files
authored
Add a cargo test step to CI (#198)
1 parent a29665a commit b7cedd9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/rust.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ jobs:
9595
cd -
9696
done
9797
98+
- name: Run cargo test on Rust packages
99+
run: |
100+
cd ${{ steps.build.outputs.ros-workspace-directory-name }}
101+
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh
102+
for path in $(colcon list | awk '$3 == "(ament_cargo)" && $1 != "examples_rclrs_minimal_pub_sub" { print $2 }'); do
103+
cd $path
104+
echo "Running cargo test in $path"
105+
cargo test
106+
cd -
107+
done
108+
98109
- name: Rustdoc check
99110
run: |
100111
cd ${{ steps.build.outputs.ros-workspace-directory-name }}

0 commit comments

Comments
 (0)