New action: check code style in this repo #3
Workflow file for this run
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: Code Style | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
jobs: | |
php-cs-fixer: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: github.event.pull_request.draft == false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@73963f5001e335723c998e4a0125ce060083985c # v2 | |
with: | |
php-version: 8.1 | |
coverage: none # disable xdebug, pcov | |
tools: cs2pr | |
- name: Composer install | |
uses: ramsey/composer-install@v3 | |
with: | |
composer-options: --ansi --prefer-dist | |
- name: Run php-cs-fixer | |
run: vendor/bin/php-cs-fixer check --ansi --diff --format=checkstyle | cs2pr |