CI: more filters, update CodeQL (#1540)
* CI: fix and more greedy filtering * CI: only run lint if *.py changed * CI: only run CodeQL if supported file changed * CI: fix unittests still triggering for build.yml * CI: update CodeQL action * CI: trigger codeql when changing the workflow
This commit is contained in:
parent
4b7033fce7
commit
3a190a8fb2
|
@ -5,12 +5,12 @@ name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/build.yaml'
|
- '.github/workflows/build.yml'
|
||||||
- 'setup.py'
|
- 'setup.py'
|
||||||
- 'requirements.txt'
|
- 'requirements.txt'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/build.yaml'
|
- '.github/workflows/build.yml'
|
||||||
- 'setup.py'
|
- 'setup.py'
|
||||||
- 'requirements.txt'
|
- 'requirements.txt'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
|
@ -14,9 +14,17 @@ name: "CodeQL"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '**.py'
|
||||||
|
- '**.js'
|
||||||
|
- '.github/workflows/codeql-analysis.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '**.py'
|
||||||
|
- '**.js'
|
||||||
|
- '.github/workflows/codeql-analysis.yml'
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '44 8 * * 1'
|
- cron: '44 8 * * 1'
|
||||||
|
|
||||||
|
@ -39,7 +47,7 @@ jobs:
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
@ -50,7 +58,7 @@ jobs:
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
|
@ -64,4 +72,4 @@ jobs:
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
|
@ -3,7 +3,13 @@
|
||||||
|
|
||||||
name: lint
|
name: lint
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**.py'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '**.py'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -5,17 +5,23 @@ name: unittests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths:
|
||||||
- 'docs/**'
|
- '**'
|
||||||
- 'setup.py'
|
- '!docs/**'
|
||||||
- '*.iss'
|
- '!setup.py'
|
||||||
- '.gitignore'
|
- '!*.iss'
|
||||||
|
- '!.gitignore'
|
||||||
|
- '!.github/workflows/**'
|
||||||
|
- '.github/workflows/unittests.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths:
|
||||||
- 'docs/**'
|
- '**'
|
||||||
- 'setup.py'
|
- '!docs/**'
|
||||||
- '*.iss'
|
- '!setup.py'
|
||||||
- '.gitignore'
|
- '!*.iss'
|
||||||
|
- '!.gitignore'
|
||||||
|
- '!.github/workflows/**'
|
||||||
|
- '.github/workflows/unittests.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
Loading…
Reference in New Issue