Skip to content

fix(ci): trigger release on every push to main/prototype (not just tags) #6

fix(ci): trigger release on every push to main/prototype (not just tags)

fix(ci): trigger release on every push to main/prototype (not just tags) #6

Workflow file for this run

# Copyright 2026 VirtusCo
name: Porter ROS CI
on:
push:
branches: [main, prototype, 'feat/**']
pull_request:
branches: [main, prototype]
defaults:
run:
shell: bash
jobs:
unit-tests:
name: Unit Tests (Python)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install pytest
- run: pytest tests/unit/ -v --tb=short
ros2-build-test:
name: ROS 2 Build & Test
runs-on: ubuntu-latest
container:
image: ros:jazzy
options: --user root
steps:
- name: Install git + git-lfs
run: |
apt-get update
apt-get install -y git git-lfs
git lfs install
- uses: actions/checkout@v4
with:
lfs: true
- name: Install system deps + YDLidar SDK
run: |
apt-get install -y python3-pip python3-colcon-common-extensions python3-rosdep build-essential cmake
git clone --depth 1 https://github.com/YDLIDAR/YDLidar-SDK.git /tmp/sdk
mkdir -p /tmp/sdk/build && cd /tmp/sdk/build
cmake .. -DCMAKE_BUILD_TYPE=Release && make -j$(nproc) && make install && ldconfig
- name: Install ROS deps
run: |
source /opt/ros/jazzy/setup.bash
rosdep update
rosdep install --from-paths src --ignore-src -r -y --skip-keys="ament_python" || true
- name: Build
run: |
source /opt/ros/jazzy/setup.bash
colcon build --symlink-install --cmake-args -Wno-dev
- name: Test
run: |
source /opt/ros/jazzy/setup.bash
source install/setup.bash
colcon test --event-handlers console_direct+
colcon test-result --verbose || true
firmware-ztest:
name: ESP32 Firmware Ztest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Zephyr toolchain
run: |
pip install west
sudo apt-get update && sudo apt-get install -y cmake ninja-build gperf ccache dfu-util \
device-tree-compiler wget xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev
- name: Init west workspace
run: |
cd esp32_firmware
west init -l .
west update --narrow --fetch-opt=--depth=1
- name: Run Ztest on native_sim
run: |
cd esp32_firmware
west twister -T tests/ -p native_sim --no-color || true
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install flake8
- run: flake8 src/ tests/ --max-line-length=99 --exclude=build,install,log,__pycache__,models --count || true