Skip to content

CodeQL Analysis

CodeQL Analysis #545

name: CodeQL Analysis
on:
push:
paths:
- '.github/workflows/codeql-analysis.yml'
branches:
- 'main'
- 'master'
schedule:
- cron: '25 23 * * *' # sync-with-template: adjust
workflow_dispatch: { }
env:
DEFAULT_JAVA_VERSION: 17
GRADLE_OPTS: -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4 -Dorg.gradle.warning.mode=all -Dorg.gradle.daemon=false -Dhttp.keepAlive=false -Dsun.net.client.defaultConnectTimeout=15000 -Dsun.net.client.defaultReadTimeout=600000 -Dsun.net.http.retryPost=false -Dsun.io.useCanonCaches=false -Djava.awt.headless=true -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
jobs:
codeql-analysis:
name: CodeQL Analysis
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Setup Java ${{env.DEFAULT_JAVA_VERSION}}
uses: actions/setup-java@v5
with:
java-version: |
${{env.DEFAULT_JAVA_VERSION}}
distribution: temurin
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 2
- name: Validate Gradle Wrapper
uses: Wandalen/wretry.action@v3.8.0
with:
action: gradle/actions/wrapper-validation@v6
attempt_limit: 3
attempt_delay: 5000
- name: Cache Gradle
id: cache-gradle
uses: remal-github-actions/cache-gradle@v1
with:
build-cache-enabled: 'false'
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: java
- name: Compile
run: |
./gradlew allClasses
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4