woocommerce/plugins/woocommerce-admin/.github/workflows/lint-php.yml

26 lines
821 B
YAML

name: Lint the PHP
on: [pull_request]
jobs:
lint-php:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Check out repository code
uses: actions/checkout@v2
- name: Determine changed files
id: changed-files
uses: wyrihaximus/github-action-files-in-commit@v1.0
- name: Setup PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: 7.3
- name: Lint the PHP
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.files }}
run: bin/phpcs.sh
shell: bash