Skip to content

Commit 55c6f38

Browse files
joaodinissfclaude
andcommitted
ci: run PMD and Checkstyle in parallel with Maven
Replace GitHub Action PMD with Maven-based PMD job for version consistency with ddk-parent/pom.xml. Add separate Checkstyle job. Both run in parallel with maven-verify for faster feedback on style violations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9870c0e commit 55c6f38

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

.github/workflows/verify.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,22 @@ jobs:
1212
with:
1313
distribution: 'temurin'
1414
java-version: '21'
15-
- name: PMD
16-
uses: pmd/pmd-github-action@v2.0.0
17-
id: pmd
15+
- name: Set up Workspace Environment Variable
16+
run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
17+
- name: PMD Check
18+
run: mvn pmd:pmd pmd:cpd pmd:check pmd:cpd-check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
19+
checkstyle:
20+
runs-on: ubuntu-24.04
21+
steps:
22+
- uses: actions/checkout@v6
23+
- uses: actions/setup-java@v5
1824
with:
19-
version: '7.21.0'
20-
rulesets: 'ddk-configuration/pmd/ruleset.xml'
21-
analyzeModifiedFilesOnly: false
22-
- name: Fail build if there are violations
23-
if: steps.pmd.outputs.violations != 0
24-
run: exit 1
25+
distribution: 'temurin'
26+
java-version: '21'
27+
- name: Set up Workspace Environment Variable
28+
run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
29+
- name: Checkstyle Check
30+
run: mvn checkstyle:checkstyle checkstyle:check -f ./ddk-parent/pom.xml --batch-mode --fail-at-end
2531
maven-verify:
2632
runs-on: ubuntu-24.04
2733
steps:
@@ -36,10 +42,10 @@ jobs:
3642
distribution: 'temurin'
3743
java-version: '21'
3844
- name: Set up Workspace Enviroment Variable
39-
run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
45+
run: echo "WORKSPACE=${{ github.workspace }}" >> $GITHUB_ENV
4046
- name: Cache Maven dependencies
4147
uses: actions/cache@v5
42-
with:
48+
with:
4349
path: /home/runner/.m2/repository
4450
key: ${{ runner.os }}-maven-0-${{ hashFiles('**/pom.xml') }}
4551
- name: Build with Maven within a virtual X Server Environment

0 commit comments

Comments
 (0)