-
-
Notifications
You must be signed in to change notification settings - Fork 403
52 lines (49 loc) · 1.4 KB
/
review.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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: analyze and review code
on: [ push, pull_request ]
jobs:
license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Java 11
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: maven
- name: Check with Maven
run: mvn -B -V license:check --file pom.xml
pmd:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Run PMD
uses: pmd/pmd-github-action@v1
with:
version: 'latest'
sourcePath: './src/main/java'
rulesets: './src/main/resources/maven-pmd-plugin-default.xml'
- name: Fail build if there are violations
if: steps.pmd.outputs.violations != 0
run: exit 1
checkstyle:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Run Checkstyle
uses: nikitasavinov/checkstyle-action@master
with:
checkstyle_config: './src/main/resources/checkstyle.xml'
workdir: './src/main/java'
reporter: 'github-pr-check'
tool_name: 'checkstyle'