mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 45 to 46. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/v45...v46) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
name: '🔎 Check Code Formatting'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths:
|
|
- 'src/**'
|
|
- '!**/README.md'
|
|
- '!**.rst'
|
|
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- edited
|
|
- reopened
|
|
- synchronize
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
formatting-check:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: '⏳ Checkout repository'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: false
|
|
persist-credentials: false
|
|
|
|
- name: '♻ Caching dependencies'
|
|
uses: actions/cache@v4.2.0
|
|
id: cache
|
|
with:
|
|
path: ~/cache/deps/bin
|
|
key: 'uncrustify'
|
|
|
|
- name: '🛠 Install dependencies'
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: source tools/ci.sh && ci_install_code_format_deps
|
|
|
|
- name: '📜 Get list of changed files'
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@v46
|
|
with:
|
|
files: |
|
|
src/**/*.c
|
|
src/**/*.h
|
|
!src/hal/**
|
|
!src/lib/**
|
|
!src/drivers/**
|
|
!src/lib/micropython/**
|
|
!src/stm32cubeai/**
|
|
!src/omv/ports/stm32/uvc/**
|
|
!src/omv/ports/stm32/boot/**
|
|
|
|
- name: '📜 Show list of changed files'
|
|
run: |
|
|
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
|
shell:
|
|
bash
|
|
|
|
- name: '🔎 Check code formatting'
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
run: |
|
|
source tools/ci.sh && ci_run_code_format_check ${{ steps.changed-files.outputs.all_changed_files }}
|