Skip to content

Commit

Permalink
ci: Ignore paths in CodeQL (OSGeo#1778)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
wenzeslaus authored Aug 6, 2021
1 parent 5afcea7 commit 60a8934
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: "CodeQL config"
paths-ignore:
- "**/testsuite/**"
- "bin.*"
- "dist.*"
- node_modules
- python/grass/pygrass/tests
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 60a8934

Please sign in to comment.