From a194d252cf8840d752077240b93d72ccc162181d Mon Sep 17 00:00:00 2001 From: Martin Perina Date: Fri, 2 Dec 2022 16:04:20 +0100 Subject: [PATCH] Check source code formatting upon PR update Check source code formatting upon PR update using jidicula/clang-format-action action. TODO: Files in src/ini are ignored for now as they need to be updated to pass formatting check Signed-off-by: Martin Perina --- .github/workflows/build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ee516f0d6..f7f63978c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,8 +6,23 @@ on: workflow_dispatch: jobs: + check-formatting: + name: Check source code formatting + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Check source code formatting + uses: jidicula/clang-format-action@v4.9.0 + with: + clang-format-version: '15' + check-path: 'src' + exclude-regex: 'ini' # TODO: remove once we fix formatting in ini subdirectory + build: - name: cs9-build + name: cs9 x86_64 build + needs: check-formatting runs-on: ubuntu-latest container: image: quay.io/centos/centos:stream9