From 2c04dd79ddeba8613f73e538aa5c4f6de38a2d1b Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sat, 6 Aug 2022 15:09:15 +0100 Subject: [PATCH] ci: add clang format to the actions --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04b65dc..7887a4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,19 @@ jobs: - name: Run luacheck run: luacheck . + clang-format: + name: Clang Format + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Dependencies + run: sudo apt-get update && sudo apt-get install --no-install-recommends -y clang-format findutils + + - name: Run clang format + run: find ./cpp -name "*.cpp" -o -name "*.hpp" | xargs clang-format -Werror --dry-run + test: name: Build and test runs-on: ubuntu-latest