From 17f3c52ffb23f918362db381e35cec9fe5dee639 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 18 Feb 2024 23:49:55 +0000 Subject: [PATCH] Source ROS workspace --- .github/workflows/reusable-pre-commit.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-pre-commit.yml b/.github/workflows/reusable-pre-commit.yml index 5ee5259..d050c0c 100644 --- a/.github/workflows/reusable-pre-commit.yml +++ b/.github/workflows/reusable-pre-commit.yml @@ -18,7 +18,17 @@ jobs: - uses: actions/checkout@v4 - uses: ros-tooling/setup-ros@0.7.1 - name: Install system hooks - run: sudo apt-get install -qq ros-${{ inputs.ros_distro }}-ament-cppcheck ros-${{ inputs.ros_distro }}-ament-cpplint ros-${{ inputs.ros_distro }}-ament-lint-cmake ros-${{ inputs.ros_distro }}-ament-copyright + run: | + sudo apt-get install -qq ros-${{ inputs.ros_distro }}-ament-cppcheck ros-${{ inputs.ros_distro }}-ament-cpplint ros-${{ inputs.ros_distro }}-ament-lint-cmake ros-${{ inputs.ros_distro }}-ament-copyright + source /opt/ros/${{ inputs.ros_distro }}/setup.bash + echo ROS_PATH=$PATH >> $GITHUB_ENV + - env: + PATH: ${{ env.ROS_PATH }} + run: | + echo $PATH + python --version - uses: pre-commit/action@v3.0.1 + env: + PATH: ${{ env.ROS_PATH }} with: extra_args: --all-files --hook-stage manual