Skip to content

Commit

Permalink
ci: fix test.yml rerun job
Browse files Browse the repository at this point in the history
  • Loading branch information
uhobeike committed May 14, 2024
1 parent fa5bb77 commit 0ae665f
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,40 @@ on:
paths-ignore:
- '**.md'

env:
RETRY-TEST-NUM: 10

jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 5
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
- 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
# ros2 run emcl2 test.bash
exit 1
source /root/ros2_ws/install/setup.bash
ros2 run emcl2 test.bash
shell: bash

retry:
Expand All @@ -68,7 +70,7 @@ jobs:
run_id
});
if (workflow_run.data.run_attempt < 10) {
if (workflow_run.data.run_attempt < ${{ env.RETRY-TEST-NUM }}) {
console.log('Triggering workflow dispatch...');
await github.rest.actions.createWorkflowDispatch({
owner,
Expand Down

0 comments on commit 0ae665f

Please sign in to comment.