Skip to content

pmd

pmd #99

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: pmd
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
schedule:
- cron: '18 19 * * 6'
permissions:
contents: read
jobs:
pmd-code-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Install PMD
run: |
curl -L -o pmd-bin.zip https://github.com/pmd/pmd/releases/download/pmd_releases/6.56.0/pmd-bin-6.56.0.zip
unzip pmd-bin.zip -d $HOME
mv $HOME/pmd-bin-6.56.0 $HOME/pmd
- name: Run PMD Analysis
run: |
$HOME/pmd/bin/run.sh pmd \
-d . \
-R rulesets/java/quickstart.xml \
-f text \
-failOnViolation false
- name: Upload PMD Report
if: always()
uses: actions/upload-artifact@v3
with:
name: pmd-report
path: pmd-report.txt