Pr fix format check UI fail #120
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Format Check' | ||
Check failure on line 1 in .github/workflows/format_check.yml
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
branches: | ||
- 'main' | ||
jobs: | ||
verify-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: false | ||
persist-credentials: false | ||
- name: Get changed source files that need format check | ||
id: changed-files | ||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 | ||
with: | ||
files: | | ||
cores/arduino/**/*.{c,cpp,h,hpp,ino} | ||
loader/**/*.{c,cpp,h,hpp,ino} | ||
libraries/**/*.{c,cpp,h,hpp,ino} | ||
files_ignore: | | ||
cores/arduino/api/** | ||
loader/llext_exports.c | ||
libraries/examples/** | ||
libraries/extras/** | ||
libraries/ea_malloc/** | ||
json: true | ||
- name: List changed files | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: echo ${{ '''' join(fromJson(steps.changed-files.outputs.all_changed_files),''' ''') '''' }} | ||
- name: Run clang-format check | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: pillo79/clang-format-action@mod | ||
with: | ||
clang-format-version: '19' | ||
check-files: '${{ steps.changed-files.outputs.all_changed_files }}' |