Improve code quality #49
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: Code Scan with Spotbugs and PMD | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
java_version: ['8'] | |
os: ['ubuntu-22.04'] | |
steps: | |
- name: Checkout on ${{ matrix.os }} | |
uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java_version }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B -q -ff compile spotbugs:spotbugs pmd:pmd | |
- name: Upload Spotbugs SARIF file | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: target/spotbugsSarif.json | |
category: Spotbugs | |
- name: Upload PMD SARIF file | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: target/pmd.sarif.json | |
category: PMD |