ORIENT/.github/workflows/code-quality-pr.yaml

24 lines
778 B
YAML

name: Code Quality
on:
pull_request:
jobs:
codeQuality:
runs-on: ubuntu-latest
name: PHPCS
steps:
- name: Checkout changes
uses: actions/checkout@v1
- name: Install PHP and PHP Code Sniffer
uses: shivammathur/setup-php@v1
with:
php-version: '7.3'
tools: phpcs
- name: Setup problem matcher for PHPCS
run: echo "::add-matcher::${{ github.workspace }}/.github/workflows/matchers/phpcs-matcher.json"
- name: Run code quality checks
run: |
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
phpcs --colors -nq --report="checkstyle" --extensions="php" $(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }} HEAD)