Skip to content

Commit

Permalink
Combine cmake and c++ linter in one job (#185)
Browse files Browse the repository at this point in the history
* Combine linters

* Add whitelines to trigger formatting

* Automatically applied linter

* add linter PAT

* Automatically applied linter

* Remove new lines

* rename linter job

---------

Co-authored-by: GitHub Actions Bot <>
  • Loading branch information
phbasler authored Dec 9, 2024
1 parent 7e1583a commit 8e69431
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 37 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/cmake-format-linter.yml

This file was deleted.

24 changes: 16 additions & 8 deletions .github/workflows/cpp-linter.yml → .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
name: cpp-linter
name: Run all linters

on:
on:
pull_request:
branches: [master]

branches: [ master, develop ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cpp-linter:
linter:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
token: ${{ secrets.LINTER_PAT }}

- name: Install clang-format
if: inputs.apply_clang_format
Expand All @@ -28,6 +30,12 @@ jobs:
run:
echo "branchName=$GITHUB_BASE_REF" >> $GITHUB_OUTPUT

- name: Format CMake files
id: cmake-format
uses: PuneetMatharu/[email protected]
with:
args: --config-files .cmake-format.py --in-place

- name: Define base git diff args
id: git-diff-args
run: |
Expand Down

0 comments on commit 8e69431

Please sign in to comment.