Feat(#24) initial pre-commit hooks #3
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: Pre-commit check | |
# Controls when the workflow will run | |
on: | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
pre-commit: | |
name: Pre-commit check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repository | |
uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Linuxbrew | |
run: sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" | |
- name: Install missing tools | |
run: brew install llvm uncrustify cppcheck include-what-you-use oclint clang-format cpplint | |
- name: Pre-commit checks | |
uses: pre-commit/[email protected] | |
- name: pre-commit-ci-lite | |
uses: pre-commit-ci/[email protected] | |
if: always() |