Skip to content

fix: add cache into the Info::version() method; move version.json i… #41

fix: add cache into the Info::version() method; move version.json i…

fix: add cache into the Info::version() method; move version.json i… #41

Workflow file for this run

name: CS-Fixer
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'bin/**'
- 'resources/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- '.editorconfig'
- 'psalm.xml'
push:
paths-ignore:
- 'docs/**'
- 'bin/**'
- 'resources/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- '.editorconfig'
- 'psalm.xml'
jobs:
cs:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [ 8.2 ]
os: [ ubuntu-latest ]
steps:
- name: Set Git To Use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
- name: Check Out Code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer Dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php-${{ matrix.php }}-${{ matrix.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
php-${{ matrix.php }}-${{ matrix.os }}-composer-
- name: Install Composer Dependencies
run: composer install --prefer-dist --no-interaction
- name: Check Coding Standards
run: vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff -vvv --using-cache=no
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply php-cs-fixer changes
branch: ${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}