From 5d77ce0caae4133cbdafbfcfb89c91ba8d875771 Mon Sep 17 00:00:00 2001 From: Harsh Deshpande Date: Mon, 10 May 2021 20:22:52 +0200 Subject: [PATCH] Add GitHub workflow for CI (#310) * init docker based CI Signed-off-by: Harsh Deshpande * target rolling only Signed-off-by: Harsh Deshpande * use setup-ros and action-ros-ci instead of custom scripts Signed-off-by: Harsh Deshpande * quiet blind except warnings https://github.com/ros2/ros1_bridge/pull/310#discussion_r621492261 Signed-off-by: Harsh Deshpande * remove ccache build times are not a concern and it is not significantly improved when using ros-tooling actions Signed-off-by: Harsh Deshpande --- .github/workflows/main.yml | 19 +++++++++++++++++++ ros1_bridge/__init__.py | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..1d6aa37b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +name: CI + +on: [push, pull_request] # on all pushes and PRs + +jobs: + ros1_bridge: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ros-tooling/setup-ros@v0.1 + with: + required-ros-distributions: "noetic rolling" + - name: Build and test ros1-bridge + uses: ros-tooling/action-ros-ci@v0.2 + with: + package-name: ros1_bridge + target-ros1-distro: noetic + target-ros2-distro: rolling + diff --git a/ros1_bridge/__init__.py b/ros1_bridge/__init__.py index 7a3fc296..1e640823 100644 --- a/ros1_bridge/__init__.py +++ b/ros1_bridge/__init__.py @@ -288,7 +288,7 @@ def get_ros2_messages(): if all(n not in data for n in ('ros1_service_name', 'ros2_service_name')): try: rules.append(MessageMappingRule(data, package_name)) - except Exception as e: + except Exception as e: # noqa: B902 print('%s' % str(e), file=sys.stderr) return pkgs, msgs, rules @@ -341,7 +341,7 @@ def get_ros2_services(): if all(n not in data for n in ('ros1_message_name', 'ros2_message_name')): try: rules.append(ServiceMappingRule(data, package_name)) - except Exception as e: + except Exception as e: # noqa: B902 print('%s' % str(e), file=sys.stderr) return pkgs, srvs, rules