Skip to content

pmd into Workflow

pmd into Workflow #17

Workflow file for this run

name: PMD
on: [push, pull_request, workflow_dispatch]
jobs:
pmd:
name: PMD Analysis
runs-on: "ubuntu-latest"
env:
pr_everything: 0
steps:
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr
- name: Clone PMD
run: |
sudo apt update -y
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev maven
sudo apt install -y default-jdk
git clone https://github.com/pmd/pmd.git pmd
(cd pmd && git checkout)
- name: Build PMD
run: |
(cd pmd && mvn clean install -DskipTests> ../pmd.txt)
alias pmd=/pmd/bin/pmd
- name: Running PMD
run: |
(cd pmd && pmd cpd -l fortran pr/src/* > ../pmd-fort.txt)
(cd pmd && pmd cpd -l python pr/toolchain/* > ../pmd-py.txt)
- name: Display PMD Reports
run: |
echo "PMD Fortran Report:"
cat pmd-fort.txt
echo "PMD Python Report:"
cat pmd-py.txt