-
Notifications
You must be signed in to change notification settings - Fork 44
39 lines (34 loc) · 993 Bytes
/
codescan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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@v3
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v3
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@v2
with:
sarif_file: target/spotbugsSarif.json
category: Spotbugs
- name: Upload PMD SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: target/pmd.sarif.json
category: PMD