From 57e405321634a7cf7b7720464b138828a7e4fbdd Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 4 Oct 2022 14:02:47 +0200 Subject: [PATCH] only test format on changed files and changed lines Signed-off-by: Matthieu Gallien --- .github/workflows/clang-format.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 0547ee643..77ca2acf0 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -4,12 +4,17 @@ on: types: [opened, synchronize, reopened] jobs: build: - runs-on: ubuntu-latest - + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - - uses: DoozyX/clang-format-lint-action@v0.14 + - uses: cpp-linter/cpp-linter-action@v2.1.1 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - source: '.' - extensions: 'h,cpp,c' - clangFormatVersion: 14 + style: file + lines-changed-only: true + version: 14 + - name: Fail fast?! + if: steps.linter.outputs.checks-failed > 0 + run: echo "Some files failed the linting checks!"