Files
tonberry-pico/.gitea/workflows/check-format.yaml
Matthias Blankertz 95b3924736
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m20s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Run pytests / Check-Pytest (push) Successful in 10s
ci: flake8 on all python folders; Run pytest in CI
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-08-27 13:43:12 +02:00

44 lines
1.2 KiB
YAML

name: Check code formatting
on:
push:
jobs:
Check-C-Format:
runs-on: ubuntu-22.04-full
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Run clang format
run: |
cmake software -B build
cmake --build build -- check-format
Check-Python-Flake8:
runs-on: ubuntu-22.04-full
steps:
- name: Get Flake8
run: |
python -m venv flake-venv
flake-venv/bin/pip install flake8==7.0
- name: Check out repository code
uses: actions/checkout@v4
with:
path: git
- name: Check python
run: |
cd git/software && (
find src -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
find tests -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
find modules -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
)
Check-Bash-Shellcheck:
runs-on: ubuntu-22.04-full
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
path: git
- name: Check bash scripts
run: |
cd git/software &&
find . -path ./lib -prune -o -name "*.sh" -exec shellcheck {} +