This repository was archived by the owner on Feb 21, 2025. It is now read-only.
Ready for v1 #1
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: "Validate PHP Code Standards" | |
on: | |
pull_request: | |
paths: | |
- "**.php" | |
- "phpcs.xml" | |
- ".github/workflows/phpcs.yml" | |
jobs: | |
phpcs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 # important! | |
- name: Cache Composer dependencies | |
uses: actions/[email protected] | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
- name: Install composer dependencies | |
uses: php-actions/composer@v6 | |
with: | |
php_version: 7.3 | |
version: 2 | |
dev: yes | |
quiet: yes | |
args: --optimize-autoloader --classmap-authoritative --prefer-dist | |
- uses: tinovyatkin/action-php-codesniffer@v1 | |
with: | |
files: "**.php" # you may customize glob as needed | |
phpcs_path: ./vendor/bin/phpcs | |
standard: "phpcs.xml" |