ci: use GitHub Action nick-invision/retry #288
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: test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
env: | |
TIME-OUT-TEST-NUM: 2 | |
RETRY-TEST-NUM: 10 | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
container: osrf/ros:humble-desktop-full | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Apt update install | |
run: | | |
sudo apt update -y | |
sudo apt install -y \ | |
psmisc \ | |
rsync \ | |
xvfb \ | |
ros-$ROS_DISTRO-navigation2 \ | |
ros-$ROS_DISTRO-nav2-bringup \ | |
ros-$ROS_DISTRO-turtlebot3-gazebo | |
- name: Build | |
run: | | |
mkdir -p /root/ros2_ws/src/emcl2_ros2/ | |
rsync -av ./ /root/ros2_ws/src/emcl2_ros2/ | |
cd /root/ros2_ws | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
rosdep update | |
rosdep install -i -y --from-path src --rosdistro $ROS_DISTRO | |
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release | |
shell: bash | |
- name: Exec | |
uses: nick-invision/retry@v3 | |
with: | |
timeout_minutes: ${{ env.TIME-OUT-TEST-NUM }} | |
max_attempts: ${{ env.RETRY-TEST-NUM }} | |
command: | | |
source /root/ros2_ws/install/setup.bash | |
ros2 run emcl2 test.bash | |
shell: bash |