Skip to content

CodeQL

CodeQL #38

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '27 23 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.TOKEN }}
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.TOKEN }}
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '21'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check Java version
run: java -version
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build with Gradle
run: ./gradlew build
- name: Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
- uses: EndBug/add-and-commit@v9
with:
add: './.github/badges/jacoco.svg'
message: 'Commit Code Coverage Image to Repo'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"