feat: support jazzy #1043
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: colcon-test | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths: [driving_log_replayer_v2/**, .github/workflows/colcon-test.yaml] | |
| schedule: | |
| - cron: 0 0 * * 0 | |
| workflow_dispatch: | |
| jobs: | |
| colcon-test: | |
| runs-on: ubuntu-latest | |
| # PEP 668: for rosdep pip rules | |
| # https://docs.ros.org/en/independent/api/rosdep/html/pip_and_pep_668.html | |
| env: | |
| PIP_BREAK_SYSTEM_PACKAGES: "1" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ros_distribution: | |
| - jazzy | |
| include: | |
| # Jazzy Jalisco (May 2024 - May 2029) | |
| - docker_image: rostooling/setup-ros-docker:ubuntu-noble-ros-jazzy-ros-base-latest | |
| ros_distribution: jazzy | |
| ros_version: 2 | |
| container: | |
| image: ${{ matrix.docker_image }} | |
| steps: | |
| - name: Cancel Previous Runs | |
| uses: styfle/cancel-workflow-action@0.12.1 | |
| with: | |
| access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Search packages in this repository | |
| id: list_packages | |
| run: | | |
| echo package_list=$(colcon list --names-only | sed -e ':loop; N; $!b loop; s/\n/ /g') >> $GITHUB_OUTPUT | |
| - name: Setup ROS environment | |
| uses: ros-tooling/setup-ros@0.7.15 | |
| with: | |
| required-ros-distributions: ${{ matrix.ros_distribution }} | |
| - name: build and test | |
| uses: ros-tooling/action-ros-ci@v0.4 | |
| id: actions_ros_ci_step | |
| with: | |
| package-name: ${{ steps.list_packages.outputs.package_list }} | |
| target-ros2-distro: ${{ matrix.ros_distribution }} | |
| vcs-repo-file-url: dependency.repos | |
| import-token: ${{ secrets.GITHUB_TOKEN }} | |
| colcon-defaults: | | |
| { | |
| "build": { | |
| "mixin": ["coverage-pytest"] | |
| }, | |
| "test": { | |
| "mixin": ["coverage-pytest"] | |
| } | |
| } | |
| colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/b8436aa16c0bdbc01081b12caa253cbf16e0fb82/index.yaml | |
| - name: Upload Unit Test Output | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork }} | |
| with: | |
| name: colcon-logs | |
| path: ${{ steps.action_ros_ci_step.outputs.ros-workspace-directory-name }}/log | |
| - name: fix paths for coverage file | |
| if: ${{ !github.event.pull_request.head.repo.fork }} | |
| run: sed -E -i 's/^([[:space:]]*<source>[[:space:]]*)(.*\/)(driving_log_replayer_v2\/driving_log_replayer_v2)/\1.\/driving_log_replayer_v2/' /__w/driving_log_replayer_v2/driving_log_replayer_v2/ros_ws/build/driving_log_replayer_v2/pytest_cov/driving_log_replayer_v2/coverage.xml | |
| - name: Upload Coverage File | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() && !github.event.pull_request.head.repo.fork }} | |
| with: | |
| name: colcon-logs | |
| path: /__w/driving_log_replayer_v2/driving_log_replayer_v2/ros_ws/build/driving_log_replayer_v2/pytest_cov/driving_log_replayer_v2/ | |
| - name: Install unzip for SonarQube | |
| if: ${{ !github.event.pull_request.head.repo.fork }} | |
| run: | | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y unzip | |
| - name: SonarQube Scan | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| if: ${{ !github.event.pull_request.head.repo.fork }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |