From a6fb63a1ac0da331f02791500bfe77e77c7859e3 Mon Sep 17 00:00:00 2001 From: zoeprieto Date: Mon, 7 Oct 2024 11:11:39 -0500 Subject: [PATCH] format check test added --- .github/workflows/ci.yml | 2 +- .github/workflows/format-check.yml | 32 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/format-check.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8413037..84aab06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,4 +65,4 @@ jobs: - name: Install tox run: pip install tox tox-gh-actions - name: Test with tox - run: tox -r -c python \ No newline at end of file + run: tox -r -c python diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml new file mode 100644 index 0000000..0b3a0ee --- /dev/null +++ b/.github/workflows/format-check.yml @@ -0,0 +1,32 @@ +name: C Format Check + +on: + # allow workflow to be run manually + workflow_dispatch: + + pull_request: + branches: + - develop + - master + +jobs: + cpp-linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cpp-linter/cpp-linter-action@v2 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: file + files-changed-only: true + tidy-checks: '-*' + version: '15' # clang-format version + file-annotations: true + step-summary: true + extensions: 'c,h' + + - name: Failure Check + if: steps.linter.outputs.checks-failed > 0 + run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1