From d48a3eb4738e7c9b6c5616ee0728886020607e7d Mon Sep 17 00:00:00 2001 From: Taras Drozdovskyi Date: Mon, 19 Feb 2024 17:06:41 +0200 Subject: [PATCH] ci: Added linter workflow Signed-off-by: Taras Drozdovskyi --- .github/workflows/linter.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..143f6ac4 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,26 @@ +name: cpp-linter + +on: [push, pull_request] + +jobs: + cpp-linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cpp-linter/cpp-linter-action@v2 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: file + # The following value will only update a single comment + # in a pull request's thread. Set it to false to disable the comment. + # Set it to true to post a new comment (and delete the old comment). + # thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} + thread-comments: ${{ github.event_name == 'push' && 'update' }} + + - name: Fail fast?! + if: steps.linter.outputs.checks-failed > 0 + run: echo "Some files failed the linting checks!" + # for actual deployment + # run: exit 1 \ No newline at end of file