Added test workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: Run unit tests | ||
on: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
test: | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
path: ros2_ws/src/husarion_ugv | ||
- name: Resolve dependencies | ||
working-directory: ros2_ws | ||
run: | | ||
vcs import < src/husarion_ugv/husarion_ugv/simulation_deps.repos src | ||
cp -r ./ros2_controllers/diff_drive_controller src | ||
cp -r ./ros2_controllers/imu_sensor_broadcaster src | ||
rm -rf ./ros2_controllers | ||
sudo apt update | ||
rosdep update --rosdistro $ROS_DISTRO | ||
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y | ||
- name: Setup ROS | ||
uses: ros-tooling/[email protected] | ||
with: | ||
use-ros2-testing: true | ||
- name: Build and test | ||
uses: ros-tooling/[email protected] | ||
with: | ||
target-ros2-distro: humble |