Skip to content

Run Unit Tests

Run Unit Tests #7

Workflow file for this run

# From https://github.com/marketplace/actions/ros-2-ci-action
name: Run Unit Tests
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
PACKAGES: vortex_filtering
jobs:
test_docker: # Iterates on all ROS 1 and ROS 2 distributions.
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution:
- humble
- iron
# Define the Docker image(s) associated with each ROS distribution.
# The include syntax allows additional variables to be defined, like
# docker_image in this case. See documentation:
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build
#
# Platforms are defined in REP 3 and REP 2000:
# https://ros.org/reps/rep-0003.html
# https://ros.org/reps/rep-2000.html
include:
# Noetic Ninjemys (May 2020 - May 2025)
# - docker_image: ubuntu:focal
# ros_distribution: noetic
# ros_version: 1
# Foxy Fitzroy (May 2020 - May 2023)
- docker_image: ubuntu:focal
ros_distribution: foxy
ros_version: 2
# Humble Hawksbill (May 2022 - May 2027)
- docker_image: ubuntu:jammy
ros_distribution: humble
ros_version: 2
# Iron Irwini (May 2023 - November 2024)
- docker_image: ubuntu:jammy
ros_distribution: iron
ros_version: 2
# Rolling Ridley (No End-Of-Life)
- docker_image: ubuntu:jammy
ros_distribution: rolling
ros_version: 2
container:
image: ${{ matrix.docker_image }}
steps:
- name: setup ROS environment
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: build and test ROS 1
if: ${{ matrix.ros_version == 1 }}
uses: ros-tooling/action-ros-ci@v0.3
with:
colcon-defaults: |
{
"build": {
"mixin": ["asan-gcc", "coverage-gcc", "coverage-pytest"]
},
"test": {
"mixin": ["coverage-pytest"]
}
}
package-name: ${{ PACKAGES }}

Check failure on line 81 in .github/workflows/run-unit-tests.yml

View workflow run for this annotation

GitHub Actions / Run Unit Tests

Invalid workflow file

The workflow is not valid. .github/workflows/run-unit-tests.yml (Line: 81, Col: 25): Unrecognized named-value: 'PACKAGES'. Located at position 1 within expression: PACKAGES .github/workflows/run-unit-tests.yml (Line: 96, Col: 25): Unrecognized named-value: 'PACKAGES'. Located at position 1 within expression: PACKAGES
target-ros1-distro: ${{ matrix.ros_distribution }}
- name: build and test ROS 2
if: ${{ matrix.ros_version == 2 }}
uses: ros-tooling/action-ros-ci@v0.3
with:
colcon-defaults: |
{
"build": {
"mixin": ["asan-gcc", "coverage-gcc", "coverage-pytest"]
},
"test": {
"mixin": ["coverage-pytest"]
}
}
package-name: ${{ PACKAGES }}
target-ros2-distro: ${{ matrix.ros_distribution }}
- uses: codecov/codecov-action@v1.2.1
with:
# token: ${{ secrets.CODECOV_TOKEN }} # only needed for private repos
files: ros_ws/lcov/total_coverage.info,ros_ws/coveragepy/.coverage
flags: unittests
name: codecov-umbrella
- uses: actions/upload-artifact@v1
with:
name: colcon-logs
path: ${{ steps.action_ros_ci_step.outputs.ros-workspace-directory-name }}/log
if: always() # upload the logs even when the build fails