From 7a5244e813ca2299c8ef9a22e14053f86b621718 Mon Sep 17 00:00:00 2001 From: Timon Engelke Date: Fri, 7 Jul 2023 23:35:38 +0200 Subject: [PATCH] ci(pre-commit): add github action for linting/formatting that will run and check the pre-commit hooks on PRs and updates on the master branch --- .github/workflows/pre-commit.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..a7bea7fa --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,16 @@ +name: Code style checks with pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + - name: Install cppcheck + run: sudo apt install cppcheck -y + - uses: pre-commit/action@v3.0.0