Переглянути джерело

ci: Ignore paths in CodeQL (#1778)

* Do not run CodeQL on PR when only HTML, Markdown, or txt is changed.
* Ignore bin and dist dir in the CodeQL analysis.
* Ignore testsuite dirs and PyGRASS in-package tests.
* Add custom CodeQL config to have paths-ignore settings.
* Ignore node_modules dir also in Git.
Vaclav Petras 3 роки тому
батько
коміт
60a89346e5

+ 7 - 0
.github/codeql/codeql-config.yml

@@ -0,0 +1,7 @@
+name: "CodeQL config"
+paths-ignore:
+  - "**/testsuite/**"
+  - "bin.*"
+  - "dist.*"
+  - node_modules
+  - python/grass/pygrass/tests

+ 5 - 0
.github/workflows/codeql-analysis.yml

@@ -5,6 +5,10 @@ on:
     branches: [master, releasebranch_7_8]
   pull_request:
     branches: [master]
+    paths-ignore:
+      - "**/*.html"
+      - "**/*.md"
+      - "**/*.txt"
   schedule:
     # Check every Saturday at 18:36
     - cron: "36 18 * * 6"
@@ -30,6 +34,7 @@ jobs:
         uses: github/codeql-action/init@v1
         with:
           languages: ${{ matrix.language }}
+          config-file: ./.github/codeql/codeql-config.yml
 
       - name: Get dependencies
         run: |

+ 3 - 0
.gitignore

@@ -42,3 +42,6 @@ mswindows/osgeo4w/setup*.hint
 mswindows/osgeo4w/vc/
 daag*.s
 doc/notebooks/.ipynb_checkpoints/
+
+# ignore paths generated by helper tools
+node_modules