Skip to content

Improve CI

Improve CI #24

Workflow file for this run

name: CodeStyle
on:
push:
pull_request:
env:
PHP_CS_FIXER_IGNORE_ENV: 1
jobs:
php-cs-fixer:
name: Code Style
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [ '8.4' ]
os: [ ubuntu-latest ]
stability: [ 'stable' ]
steps:
- name: Set Git To Use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v7
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: "memory_limit=-1"
- name: Validate Composer
run: composer validate
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Restore Composer Cache
uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
- name: Install Dependencies
uses: nick-invision/retry@v4
with:
timeout_minutes: 5
max_attempts: 3
command: composer update --prefer-${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
# Action
- name: Check Code Style
run: composer phpcs:check