fix #2848 Refactor code: Replace redundant conditions and enhance rea… #818
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
name: "CodeQL" | |
on: | |
push: | |
branches: | |
- master | |
- "*.x" | |
pull_request: | |
branches: | |
- master | |
- "*.x" | |
schedule: | |
- cron: '36 4 * * 2' | |
workflow_dispatch: | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ['java', 'javascript'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |