test #79
This file contains 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: test | |
on: # NOLINT | |
pull_request: | |
push: | |
schedule: | |
- cron: '0 10 * * MON' | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ros_distribution: | |
- humble | |
- rolling | |
include: | |
# Humble Hawksbill (May 2022 - May 2027) | |
- docker_image: osrf/ros:humble-desktop-full | |
ros_distribution: humble | |
ros_version: 2 | |
# Iron Irwini (May 2023 - November 2024) | |
- docker_image: osrf/ros:iron-desktop-full | |
ros_distribution: iron | |
ros_version: 2 | |
# Rolling Ridley (No End-Of-Life) | |
- docker_image: osrf/ros:rolling-desktop-full | |
ros_distribution: rolling | |
ros_version: 2 | |
container: | |
image: ${{ matrix.docker_image }} | |
steps: | |
- name: Setup ROS 2 | |
uses: ros-tooling/[email protected] | |
with: | |
required-ros-distributions: ${{ matrix.ros_distribution }} | |
- name: Build and test | |
if: ${{ matrix.ros_version == 2 }} | |
id: built-and-test | |
uses: ros-tooling/[email protected] | |
with: | |
package-name: rqt_dotgraph | |
target-ros2-distro: ${{ matrix.ros_distribution }} | |
vcs-repo-file-url: "" | |
colcon-defaults: | | |
{ | |
"build": { | |
"mixin": ["coverage-pytest"] | |
}, | |
"test": { | |
"mixin": ["coverage-pytest"] | |
} | |
} | |
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: false | |
- name: Setup copy of repo | |
uses: actions/checkout@v4 | |
- name: Install Python dependencies | |
run: | | |
# This is not the preferred way to install Python tools but seems to be required here. | |
# "python3 -m pip install" would be preferred. | |
sudo pip3 install --upgrade pip | |
sudo pip3 install --upgrade setuptools | |
sudo pip3 install --upgrade wheel | |
sudo pip3 install --upgrade coverage | |
sudo pip3 install --upgrade statick | |
sudo pip3 install --upgrade statick-md | |
sudo pip3 install --upgrade pycodestyle | |
sudo pip3 install --upgrade pyflakes | |
- name: Install Apt dependencies (Linux) | |
run: | | |
sudo apt install cccc | |
sudo apt install libxml2 | |
sudo apt install libxml2-utils | |
sudo apt install curl | |
# Have to install newer version of node from non-apt source due to SSL library compatibility issues. | |
curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh | |
sudo bash nodesource_setup.sh | |
sudo apt install nodejs | |
sudo npm install -g n | |
sudo n stable | |
sudo npm install -g markdownlint-cli | |
rm nodesource_setup.sh | |
- name: Statick | |
run: | | |
. /opt/ros/${{ matrix.ros_distribution }}/setup.sh | |
statick . --check --output-directory statick-output --user-paths ./statick_config --profile rqt_dotgraph_profile.yaml --config rqt_dotgraph_config.yaml --log info --timings |