Files
PX4-Autopilot/.github/workflows/python_checks.yml
T
Ramon Roche 14cf29bb31 fix(build): check submodules once per configure, never reset changes
Every px4_add_git_submodule call ran check_submodules.sh twice, at
configure and build time, and with CI=true force-updated each submodule
every time, a 2017 workaround for an interactive prompt that is gone.
VS Code and CLion force-updated too, resetting submodule changes under
development.

The check now runs once per configure. A missing submodule is fetched;
one at another commit is kept as it is, with a warning locally and an
error in CI.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-09-28 11:50:38 -07:00

45 lines
1.0 KiB
YAML

name: Python CI Checks
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}"]
steps:
- uses: runs-on/action@v2
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install tools
run: pip install mypy types-requests flake8 pyyaml
- name: Check MAVSDK test scripts with mypy
run: mypy --strict test/mavsdk_tests/*.py
- name: Check MAVSDK test scripts with flake8
run: flake8 test/mavsdk_tests/*.py
- name: Check ROS workspace tooling
run: |
flake8 Tools/ros2/*.py
python3 -m unittest discover -s Tools/ros2 -p 'test_*.py'
- name: Test submodule check
run: python3 -m unittest discover -s Tools -p 'test_check_submodules.py' -v