Skip to content

Commit a8fbf2a

Browse files
splusbhypery2k
authored andcommitted
Added PMD checks to existing build workflow
1 parent 409a216 commit a8fbf2a

2 files changed

Lines changed: 54 additions & 78 deletions

File tree

.github/workflows/build.yml

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,68 @@
11
name: Build
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- develop
8-
pull_request:
9-
merge_group:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
merge_group:
1010

1111
permissions:
12-
id-token: write # This is required for requesting the JWT
13-
security-events: write
14-
contents: read
15-
actions: read # This is required for actions/checkout
16-
issues: write
17-
pull-requests: write
18-
checks: write # needed for spotbugs
12+
id-token: write # This is required for requesting the JWT
13+
security-events: write
14+
contents: read
15+
actions: read # This is required for actions/checkout
16+
issues: write
17+
pull-requests: write
18+
checks: write # needed for spotbugs
1919

2020
jobs:
21-
build:
22-
strategy:
23-
matrix:
24-
os: [ ubuntu-latest,windows-latest ]
25-
java: [ 11, 17 ]
26-
fail-fast: false
21+
build:
22+
strategy:
23+
matrix:
24+
os: [ubuntu-latest, windows-latest]
25+
java: [11, 17]
26+
fail-fast: false
2727

28-
runs-on: ${{ matrix.os }}
28+
runs-on: ${{ matrix.os }}
2929

30-
steps:
31-
- name: Checkout
32-
uses: actions/checkout@v3
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
3333

34-
- name: Set up cache for ~./m2/repository
35-
uses: actions/cache@v3
36-
with:
37-
path: ~/.m2/repository
38-
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
39-
restore-keys: |
40-
maven-${{ matrix.os }}-java${{ matrix.java }}-
41-
maven-${{ matrix.os }}-
34+
- name: Set up cache for ~./m2/repository
35+
uses: actions/cache@v3
36+
with:
37+
path: ~/.m2/repository
38+
key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
39+
restore-keys: |
40+
maven-${{ matrix.os }}-java${{ matrix.java }}-
41+
maven-${{ matrix.os }}-
4242
43-
- name: Set up JDK
44-
uses: actions/setup-java@v3
45-
with:
46-
java-version: ${{ matrix.java }}
47-
distribution: 'adopt'
43+
- name: Set up JDK
44+
uses: actions/setup-java@v3
45+
with:
46+
java-version: ${{ matrix.java }}
47+
distribution: "adopt"
4848

49-
- name: Build with Maven
50-
run: ./mvnw --batch-mode clean install
49+
- name: Build with Maven
50+
run: ./mvnw --batch-mode clean install
5151

52-
deploy:
53-
needs: [ build ]
54-
runs-on: ubuntu-latest
52+
- name: Run PMD checks
53+
run: ./mvnw pmd:check
5554

56-
steps:
57-
- name: Check out
58-
uses: actions/checkout@v3
59-
with:
60-
fetch-depth: 0
61-
- name: Set up JDK 11
62-
uses: actions/setup-java@v3
63-
with:
64-
distribution: 'adopt'
65-
java-version: 11
55+
deploy:
56+
needs: [build]
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- name: Check out
61+
uses: actions/checkout@v3
62+
with:
63+
fetch-depth: 0
64+
- name: Set up JDK 11
65+
uses: actions/setup-java@v3
66+
with:
67+
distribution: "adopt"
68+
java-version: 11

.github/workflows/ci.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)