Skip to content

refact(core): Refactor FriendlyErrorFormatter for improved structure … #547

refact(core): Refactor FriendlyErrorFormatter for improved structure …

refact(core): Refactor FriendlyErrorFormatter for improved structure … #547

Workflow file for this run

name: Tests
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
name: 'PHP Lint ${{ matrix.php-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Run lint
run: find ./src ./tests -type f -name "*.php" -print0 | xargs -0 -P10 -n1 -- php -l
php_cs_fixer:
name: 'PHP CS Fixer'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install dependencies
run: composer update --no-interaction --no-progress --ansi
- name: Run coding standards check
run: composer run cs-fix-dry
phpstan:
name: 'PHPStan'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install dependencies
run: composer update --no-interaction --no-progress --ansi
- name: Run static analysis
run: composer run analyze
typos:
name: "Check for typos"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Check for typos"
uses: "crate-ci/typos@v1.24.5"
unit_tests:
name: 'Unit Test ${{ matrix.php-version }}, ${{ matrix.dependency-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
dependency-version: [prefer-lowest, prefer-stable]
steps:
- uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: none
- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi
- name: Run unit tests
run: composer run test