Skip to content

Commit

Permalink
Merge pull request #51 from husarion/workflow-test
Browse files Browse the repository at this point in the history
Workflow test
  • Loading branch information
rafal-gorecki authored Oct 24, 2023
2 parents f3a3fcd + de43520 commit 6ac53a9
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 31 deletions.
1 change: 0 additions & 1 deletion .github/workflows/black.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Black python lint

on:
workflow_call:
push:

jobs:
lint:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
types: [closed]

jobs:
industrial_ci:
uses: ./.github/workflows/industrial_ci.yaml

get-bump:
name: Get version bump
runs-on: ubuntu-latest
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/industrial_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
name: Industrial CI
on:
workflow_call:
pull_request:
workflow_dispatch:
push:
branches:
- master


jobs:
black_test:
uses: ./.github/workflows/black.yaml

spellcheck_test:
uses: ./.github/workflows/spellcheck.yaml

industrial_ci:
strategy:
fail-fast: false
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/spellcheck.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Spellcheck Action

on:
workflow_call:
push:
workflow_call:

jobs:
build:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rojopolis/spellcheck-github-actions@0.33.1
name: Spellcheck
build:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rojopolis/spellcheck-github-actions@0.33.1
name: Spellcheck
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ repos:
files: ^.github|./\.yaml

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.10.1
hooks:
- id: black
args: ["--line-length=99"]
args: ["--line-length=99", "--experimental-string-processing"]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
Expand Down
4 changes: 3 additions & 1 deletion rosbot_xl_bringup/launch/bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def generate_launch_description():
declare_mecanum_arg = DeclareLaunchArgument(
"mecanum",
default_value="False",
description="Whether to use mecanum drive controller (otherwise diff drive controller is used)",
description=(
"Whether to use mecanum drive controller (otherwise diff drive controller is used)"
),
)

lidar_model = LaunchConfiguration("lidar_model")
Expand Down
19 changes: 12 additions & 7 deletions rosbot_xl_controller/test/test_diff_drive_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,20 @@ def test_controllers_startup_fail():

node.start_node_thread()
msgs_received_flag = node.joint_state_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Expected JointStates message not received. Check joint_state_broadcaster!"
assert not msgs_received_flag, (
"Received JointStates message that should not have appeared. Check whether other"
" robots are connected to your network.!"
)
msgs_received_flag = node.odom_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Expected Odom message not received. Check rosbot_base_controller!"
assert not msgs_received_flag, (
"Received Odom message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
msgs_received_flag = node.imu_msg_event.wait(timeout=10.0)
assert not msgs_received_flag, "Expected Imu message not received. Check imu_broadcaster!"
assert not msgs_received_flag, (
"Received Imu message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
finally:
rclpy.shutdown()

Expand Down
19 changes: 12 additions & 7 deletions rosbot_xl_controller/test/test_mecanum_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,20 @@ def test_controllers_startup_fail():

node.start_node_thread()
msgs_received_flag = node.joint_state_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Expected JointStates message not received. Check joint_state_broadcaster!"
assert not msgs_received_flag, (
"Received JointStates message that should not have appeared. Check whether other"
" robots are connected to your network.! aaaaaaaaaaaaaaaaaaaaaaaaaaa"
)
msgs_received_flag = node.odom_msg_event.wait(timeout=10.0)
assert (
not msgs_received_flag
), "Expected Odom message not received. Check rosbot_base_controller!"
assert not msgs_received_flag, (
"Received Odom message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
msgs_received_flag = node.imu_msg_event.wait(timeout=10.0)
assert not msgs_received_flag, "Expected Imu message not received. Check imu_broadcaster!"
assert not msgs_received_flag, (
"Received Imu message that should not have appeared. Check whether other robots are"
" connected to your network.!"
)
finally:
rclpy.shutdown()

Expand Down
4 changes: 3 additions & 1 deletion rosbot_xl_gazebo/launch/simulation.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def generate_launch_description():
declare_mecanum_arg = DeclareLaunchArgument(
"mecanum",
default_value="False",
description="Whether to use mecanum drive controller (otherwise diff drive controller is used)",
description=(
"Whether to use mecanum drive controller (otherwise diff drive controller is used)"
),
)

lidar_model = LaunchConfiguration("lidar_model")
Expand Down

0 comments on commit 6ac53a9

Please sign in to comment.