aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/pre-commit.yml
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2024-01-14 17:01:51 +0100
committerJán Sučan <jan@jansucan.com>2024-01-14 17:28:13 +0100
commitc4afa26813cde115e543d82f96bcb89f289d21a6 (patch)
tree30aea06f07bd3df593c8fbbc88834fc848af9222 /.github/workflows/pre-commit.yml
parentfe035722a5c9c7f2a4008ed07126c0249b35671a (diff)
github: Add initial pre-commit workflow
Diffstat (limited to '.github/workflows/pre-commit.yml')
-rw-r--r--.github/workflows/pre-commit.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
new file mode 100644
index 0000000..5b2bb9d
--- /dev/null
+++ b/.github/workflows/pre-commit.yml
@@ -0,0 +1,22 @@
+name: Run pre-commit checks
+
+on:
+ pull_request:
+ push:
+
+jobs:
+ run-pre-commit:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Install pre-commit
+ run: pip install pre-commit
+
+ - name: Install cppcheck
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y cppcheck
+
+ - name: Run pre-commit
+ run: pre-commit run --all-files