This action builds a ROS, or ROS 2 workspace from source, and run colon-test on the package under test.
This action requires ROS development tools (colcon
, rosdep
, vcs
) to be installed on the CI worker instance.
On Linux, the setup can be done through ros-tooling/setup-ros
, or by running the action in a Docker image containing the appropriate binaries.
The action first assembles a workspace, then run colcon build
, and colcon test
in it.
The workspace is built by running:
vcs import
on the repo file specified through thevcs-repo-file-url
argument (defaults tohttps://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
).- checkout the code under test in the workspace using
vcs
- run
colcon build
for all packages specified inpackage-name
- run
colcon test
for all packages specified inpackage-name
This action defines an output variable ros-workspace-directory-name
.
It contains the path to the root of the ROS workspace assembled by the action.
The variable value should be used to retrieve logs, binaries, etc. after the action completes.
See action.yml to get the list of flags supported by this action.
action-ros-ci-template offers a template for using action-ros-ci
steps:
- uses: ros-tooling/setup-ros@0.0.16
- uses: ros-tooling/action-ros-ci@0.0.15
with:
package-name: ament_copyright
You can specify your own repos file using the vcs-repo-file-url
input.
You can also automatically generate your package's dependencies using the following workflow:
steps:
- uses: actions/checkout@v2
- uses: ros-tooling/setup-ros@0.0.16
# Run the generator and output the results to a file.
- run: |
rosinstall_generator <package-name> --rosdistro <target-distro> \
--deps-only --deps --upstream-development > /tmp/deps.repos
# Pass the file to the action
- uses: ros-tooling/action-ros-ci@0.0.15
with:
package-name: my_package
vcs-repo-file-url: /tmp/deps.repos
The scripts and documentation in this project are released under the Apache 2