foxygit / doom Log in
commit 7f25bf6fbd0b6917912db86d5e321886375247aa
Author:     Michael Francis <4574480+mfrancis95@users.noreply.github.com>
AuthorDate: Sat Oct 7 08:17:52 2023 -0400
Commit:     Turo Lamminen <turol@users.noreply.github.com>
CommitDate: Mon Oct 9 13:51:18 2023 +0300

    Move cppcheck into its own workflow
---
 .github/workflows/cppcheck.yml | 23 +++++++++++++++++++++++
 .github/workflows/main.yml     | 16 ----------------
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml
new file mode 100644
index 00000000..2cc8f1b5
--- /dev/null
+++ b/.github/workflows/cppcheck.yml
@@ -0,0 +1,23 @@
+name: cppcheck
+
+on:
+  pull_request:
+    types: [opened, reopened, synchronize]
+  push:
+    branches:
+      - master
+
+jobs:
+  cppcheck:
+    runs-on: ubuntu-20.04
+
+    steps:
+      - name: Install dependencies
+        run: sudo apt-get update && sudo apt-get install cppcheck
+
+      - uses: actions/checkout@v2
+
+      - name: Run cppcheck
+        env:
+          ANALYZE: true
+        run: $GITHUB_WORKSPACE/.travis.sh
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bfdc1e0f..9a7b640c 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -37,19 +37,3 @@ jobs:
         env:
           CC: ${{ matrix.compiler }}
         run: $GITHUB_WORKSPACE/.travis.sh
-
-  cppcheck:
-    runs-on: ubuntu-20.04
-
-    steps:
-      - name: Install dependencies
-        run: sudo apt-get update && sudo apt-get install cppcheck
-
-      - uses: actions/checkout@v2
-        with:
-          submodules: true
-
-      - name: Run cppcheck
-        env:
-          ANALYZE: true
-        run: $GITHUB_WORKSPACE/.travis.sh