diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index feb9a37fe120c..6b13b8c1ced82 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -16,7 +16,10 @@ name: Code style checks on: - pull_request + pull_request: + paths: + - '.github/workflows/code_style.yml' + - 'cpp/**' concurrency: group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} @@ -24,24 +27,17 @@ concurrency: jobs: format-check: - name: Formatting Check + name: Format Check runs-on: ubuntu-latest - strategy: - matrix: - path: - - check: 'cpp/core' - exclude: '' - - check: 'cpp/velox' - exclude: '' steps: - uses: actions/checkout@v4 - - name: Run clang-format style check for C/C++ programs. + - name: Run clang-format style check for C/C++ uses: jidicula/clang-format-action@v4.11.0 with: clang-format-version: '15' - check-path: ${{ matrix.path['check'] }} + check-path: './cpp/' fallback-style: 'Google' # optional - - name: Format CMake files + - name: Check CMake format id: cmake-format uses: PuneetMatharu/cmake-format-lint-action@v1.0.4 with: @@ -50,10 +46,8 @@ jobs: license-check: name: License Header Check runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - - name: Check License Header run: | git fetch --recurse-submodules=no origin main ${{github.event.pull_request.base.sha}}