forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add CodeQL configuration (valkey-io#2186)
* add CodeQL configuration --------- Signed-off-by: James Xin <[email protected]>
- Loading branch information
1 parent
3874ad0
commit 28813a9
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
paths-ignore: | ||
- "examples/kotlin/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "v.?[0-9]+.[0-9]+.[0-9]+" | ||
- "v.?[0-9]+.[0-9]+" | ||
- "v?[0-9]+.[0-9]+.[0-9]+" | ||
- "v?[0-9]+.[0-9]+" | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "v.?[0-9]+.[0-9]+.[0-9]+" | ||
- "v.?[0-9]+.[0-9]+" | ||
- "v?[0-9]+.[0-9]+.[0-9]+" | ||
- "v?[0-9]+.[0-9]+" | ||
schedule: | ||
- cron: "37 18 * * 6" | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze (${{ matrix.language }}) | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- language: csharp | ||
build-mode: none | ||
- language: go | ||
build-mode: autobuild | ||
- language: java-kotlin | ||
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too. | ||
- language: javascript-typescript | ||
build-mode: none | ||
- language: python | ||
build-mode: none | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: ${{ matrix.build-mode }} | ||
config-file: .github/codeql/codeql-config.yml | ||
|
||
- if: matrix.build-mode == 'manual' | ||
shell: bash | ||
run: | | ||
echo 'TODO: build commands for all java and kotlin codes.' | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |