Files
PX4-Autopilot/.github/workflows/python_checks.yml
T
Julian Oes bc690bbb5c ci(workflows): set token permissions on every workflow (#29489)
Eleven workflows had no top-level permissions block, so any job without
its own ran with the repository's default token permissions. Set the
least each one needs: read-only contents for the build, test and
Crowdin upload workflows, which only check out code and use their own
tokens for anything else; issues, pull requests and the Actions cache
for the stale bot. Workflows whose jobs already set permissions get a
read-only default for any job added later.

This clears the actions/missing-workflow-permissions code scanning
alerts.

Assisted-by: Claude:claude-opus-5-5

Signed-off-by: Julian Oes <julian@oes.ch>
(cherry picked from commit ddc63c57e8)
2026-10-30 15:17:00 +01:00

40 lines
803 B
YAML

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 flake8
- 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