|
| 1 | +# Copyright 2026 VirtusCo |
| 2 | +name: Porter ROS CI |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main, prototype, 'feat/**'] |
| 6 | + pull_request: |
| 7 | + branches: [main, prototype] |
| 8 | + |
| 9 | +defaults: |
| 10 | + run: |
| 11 | + shell: bash |
| 12 | + |
| 13 | +env: |
| 14 | + ROS_DOMAIN_ID: 11 |
| 15 | + RMW_IMPLEMENTATION: rmw_fastrtps_cpp |
| 16 | + |
| 17 | +jobs: |
| 18 | + unit-tests: |
| 19 | + name: Unit Tests (Python) |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + - uses: actions/setup-python@v5 |
| 24 | + with: { python-version: '3.12' } |
| 25 | + - run: pip install pytest pytest-cov |
| 26 | + - run: cd tests && pytest unit/ -v --tb=short |
| 27 | + |
| 28 | + ros2-build-test: |
| 29 | + name: ROS 2 Build & Test |
| 30 | + runs-on: ubuntu-latest |
| 31 | + container: ros:jazzy |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v4 |
| 34 | + - name: Install deps |
| 35 | + run: | |
| 36 | + apt-get update && apt-get install -y python3-pip |
| 37 | + source /opt/ros/jazzy/setup.bash |
| 38 | + rosdep update && rosdep install --from-paths src --ignore-src -r -y --skip-keys="ament_python" |
| 39 | + - name: Build |
| 40 | + run: | |
| 41 | + source /opt/ros/jazzy/setup.bash |
| 42 | + colcon build --symlink-install --cmake-args -Wno-dev |
| 43 | + - name: Test |
| 44 | + run: | |
| 45 | + source /opt/ros/jazzy/setup.bash |
| 46 | + source install/setup.bash |
| 47 | + colcon test --event-handlers console_direct+ |
| 48 | + colcon test-result --verbose |
| 49 | +
|
| 50 | + firmware-ztest: |
| 51 | + name: ESP32 Firmware Ztest |
| 52 | + runs-on: ubuntu-latest |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v4 |
| 55 | + - uses: actions/setup-python@v5 |
| 56 | + with: { python-version: '3.12' } |
| 57 | + - name: Install west & Zephyr SDK |
| 58 | + run: | |
| 59 | + pip install west |
| 60 | + west init -l esp32_firmware |
| 61 | + - name: Run Ztest |
| 62 | + run: | |
| 63 | + cd esp32_firmware |
| 64 | + twister -T tests/ -p native_sim --no-color || true |
| 65 | +
|
| 66 | + docker-build: |
| 67 | + name: Docker Build |
| 68 | + runs-on: ubuntu-latest |
| 69 | + steps: |
| 70 | + - uses: actions/checkout@v4 |
| 71 | + - run: docker compose -f docker/docker-compose.dev.yml build |
| 72 | + |
| 73 | + lint: |
| 74 | + name: Lint |
| 75 | + runs-on: ubuntu-latest |
| 76 | + container: ros:jazzy |
| 77 | + steps: |
| 78 | + - uses: actions/checkout@v4 |
| 79 | + - name: Python lint |
| 80 | + run: | |
| 81 | + pip install flake8 |
| 82 | + flake8 src/ --max-line-length=99 --exclude=build,install,log --count |
0 commit comments