Skip to content

Commit

Permalink
ci: add format check ci
Browse files Browse the repository at this point in the history
Signed-off-by: iGxnon <[email protected]>
  • Loading branch information
iGxnon committed Jan 30, 2024
1 parent 4c3aae0 commit cc746b8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Checks

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch: {}

env:
STYLE: "{ IndentWidth: 4, BasedOnStyle: google, AlignConsecutiveAssignments: true }"

jobs:
format:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install clang-format
run: sudo apt-get update -y --force-yes && sudo apt-get install -y --force-yes clang-format

- name: Check format
run: "clang-format --dry-run -Werror --style='${{ env.STYLE }}' src/*"

0 comments on commit cc746b8

Please sign in to comment.