From fad5d9b16cb4b9012a7e9801acde5f28b5beacf0 Mon Sep 17 00:00:00 2001 From: Alexander Chuprov Date: Fri, 15 Nov 2024 19:03:16 +0300 Subject: [PATCH] [#164] .forgejo: Add clang-format support Signed-off-by: Alexander Chuprov --- .forgejo/workflows/tests.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml index 42fe353..fdf5301 100644 --- a/.forgejo/workflows/tests.yml +++ b/.forgejo/workflows/tests.yml @@ -20,6 +20,27 @@ jobs: - name: Run linters run: make lint + check-format: + name: Check format + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install deps + run: | + apt update + apt install -y clang-format + + - name: Run clang-format + run: clang-format -i **/*.js + + - name: Print diff + run: git diff HEAD + + - name: Check that nothing has changed + run: git diff-index --exit-code HEAD + tests: name: Tests runs-on: ubuntu-latest