chore: Debug #34
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: PHP Mess Detector | |
on: push | |
jobs: | |
phpmd: | |
name: PHP Mess Detector | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP environment | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
tools: phpmd | |
- name: Run PHP Mess Detector on modified files | |
id: runmd | |
uses: Ana06/[email protected] | |
with: | |
filter: '*.php' | |
run: | | |
echo "outputs: " "${{ steps.runmd.outputs.all }}" | |
if [ -s "${{ steps.runmd.outputs.all }}" ]; then | |
FILES=`echo ${{ steps.runmd.outputs.all }} | paste -sd "," -` | |
echo "Running PHPMD on" $FILES | |
phpmd $FILES github .github/phpmd-ruleset.xml --exclude 'vendor/*' | |
exit $? | |
else | |
echo "There are no changes in PHP files (no PHP-MD test performed)" | |
fi |