Revisión de estilo automática Github Actions name: PSR-12 validation on: push: jobs: psr12-validation: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install PHP and Composer uses: shivammathur/setup-php@v2 with: php-version: '7.4' tools: composer - name: Install PSR-12 sniffer run: composer global require "squizlabs/php_codesniffer=*" - name: Validate PSR-12 compliance run: git diff --name-only HEAD~1 HEAD | grep '\.php$' | xargs php ~/.composer/vendor/bin/phpcs --standard=PSR12 Bitbucket # Configuración del pipeline pipelines: default: - step: name: Validación del estándar PSR-12 image: php:7.4 script: - apt-get update && apt-get install -y git - git clone https://github.com/php-fig/fig-standards.git - cd fig-standards && git checkout master - cd ../ && git diff --name-only HEAD~1 HEAD | grep '\.php$' | xargs php fig-standards/checkstyle/checkstyle.php --config=PSR12.xml