From e32709b6381b343ddffa92f483aad68010d644c3 Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Sat, 27 Jan 2024 18:59:50 +0100 Subject: [PATCH] Add CI --- .github/workflows/code-formatting.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/code-formatting.yml diff --git a/.github/workflows/code-formatting.yml b/.github/workflows/code-formatting.yml new file mode 100644 index 0000000..db06465 --- /dev/null +++ b/.github/workflows/code-formatting.yml @@ -0,0 +1,25 @@ +name: clang-format Check +on: + push: + branches: + - main + pull_request: + types: [ assigned, opened, synchronize, reopened ] +jobs: + formatting-check: + name: Formatting Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run clang-format style check for C/C++/Protobuf programs. + uses: jidicula/clang-format-action@v4.11.0 + with: + clang-format-version: '14' + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: 'pip' + - run: python -m pip install --upgrade pip + - run: python -m pip install isort black + - run: python -m isort . --profile black --check-only --diff + - run: python -m black . --check --diff