From db53bf16240b657c8b316e727ee20d23264be716 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 16 Oct 2021 19:20:29 +0200 Subject: [PATCH] Run both checks on the same instance This should save some time since we only have to boot up the environment once --- .github/workflows/clang-format-check.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index b59db56c3..f875f98a1 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -9,18 +9,23 @@ on: jobs: formatting-check: - name: Formatting Check runs-on: ubuntu-latest - strategy: - matrix: - path: - - 'Source' - - 'test' steps: - - uses: actions/checkout@v2 - - name: Run clang-format style check for C/C++ programs. + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Formatting Check (Source) + uses: jidicula/clang-format-action@v3.4.0 + with: + clang-format-version: '11' + check-path: 'Source' + fallback-style: 'webkit' + + - name: Formatting Check (test) uses: jidicula/clang-format-action@v3.4.0 with: clang-format-version: '11' - check-path: ${{ matrix.path }} + check-path: 'test' fallback-style: 'webkit'