Skip to content

Merge pull request #71 from PoulainMaxime/feat/add_new_rule #117

Merge pull request #71 from PoulainMaxime/feat/add_new_rule

Merge pull request #71 from PoulainMaxime/feat/add_new_rule #117

Workflow file for this run

name: PHP tests
on: [push, pull_request]
jobs:
# Check there is no syntax errors in the project
php-linter:
name: PHP Syntax check 7.2|7.3|7.4|8.0`
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Checkout
uses: actions/checkout@v2.0.0
- name: PHP Syntax Checker
run: sh -c "! (find . -type f -name \"*.php\" $1 -exec php -l -n {} \; | grep -v \"No syntax errors detected\")"
# Check the PHP code follow the coding standards
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Checkout
uses: actions/checkout@v2
- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress --quiet
- name: Run PHP CS Fixer
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff