Add a code formatter #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Style | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
paths: | |
- '**.[ch]pp' | |
- '**.[ch]' | |
- '.github/**' | |
workflow_dispatch: | |
jobs: | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout FANS | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
check-latest: true | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Run checks | |
run: pre-commit run -a -v | |
- name: Git status | |
if: always() | |
run: git status | |
- name: Full diff | |
if: always() | |
run: git diff |