Merge pull request #1 from themosis/dependabot/composer/twig/twig-3.11.1 #5
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: PHP CS Fixer | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Create PHP CS Fixer directory | |
run: mkdir -p tools/php-cs-fixer | |
- name: Install PHP CS Fixer | |
run: composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer | |
- name: Run PHP CS Fixer | |
run: composer run-script fix |