Skip to content

ci: Enable qual/pre commit/clang-format #29

ci: Enable qual/pre commit/clang-format

ci: Enable qual/pre commit/clang-format #29

Workflow file for this run

---
name: pre-commit
on:
pull_request:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update && sudo apt-get install cppcheck
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
cache: pip
python-version: "3.11"
- run: python -m pip install pre-commit
- uses: actions/cache/restore@v3
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
}}
- run: pre-commit run --show-diff-on-failure --color=always --all-files
- uses: actions/cache/save@v3
if: ${{ always() }}
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
}}