name: Python CI Checks on: push: branches: - 'main' paths-ignore: - 'docs/**' pull_request: branches: - '**' paths-ignore: - 'docs/**' permissions: contents: read 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 types-PyYAML flake8 pyyaml pip install -r Tools/setup/test-requirements.txt - name: Check MAVSDK test scripts with mypy run: mypy --strict test/mavsdk_tests/*.py - name: Check MAVSDK test scripts with flake8 run: flake8 --config test/mavsdk_tests/.flake8 test/mavsdk_tests/*.py - name: Check USB ID tooling with mypy and flake8 working-directory: Tools/ci run: | mypy --strict check_usb_ids.py usb_ids_runner.py test_check_usb_ids.py test_usb_ids_runner.py flake8 check_usb_ids.py usb_ids_runner.py test_check_usb_ids.py test_usb_ids_runner.py - name: Check AI review tooling and the PR review poster working-directory: Tools/ci run: | mypy --strict -p ai_review flake8 ai_review test_pr_review_poster.py python3 -m unittest discover -s ai_review -t . -v python3 -m unittest -v test_pr_review_poster - 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