Update pmd.yml #111
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: PMD Analysis | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
pmd: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
maven-${{ runner.os }}- | |
- name: Build All Modules | |
run: mvn clean install -DskipTests | |
- name: Run PMD Analysis | |
run: mvn pmd:pmd pmd:check || true # Dont stop on error | |
- name: Upload PMD Reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pmd-reports | |
path: '**/target/pmd.xml' | |
retention-days: 7 |