Skip to content

ci: use GitHub Action nick-invision/retry #301

ci: use GitHub Action nick-invision/retry

ci: use GitHub Action nick-invision/retry #301

Workflow file for this run

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
run: |
source /root/ros2_ws/install/setup.bash
timeout 240 ros2 run emcl2 test.bash
shell: bash
retry:
needs: test
if: ${{ needs.build.outputs.build-status == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Retry failed jobs
uses: hourki-actions/retry-workflow-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow_run_id: ${{ github.run_id }}
max_retries: ${{ env.RETRY-TEST-NUM }}