Skip to content

chore: add pre-commit hook PHP CS Fixer #195

chore: add pre-commit hook PHP CS Fixer

chore: add pre-commit hook PHP CS Fixer #195

name: PsBilling Quality Control PHP
concurrency:
group: qc-${{ github.ref }}
on: [push]
jobs:
php-linter:
name: PHP Syntax check 5.6|7.2|7.3|7.4|8.0|8.1|8.2
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: PHP syntax checker 7.2
uses: prestashop/github-action-php-lint/7.2@master
- name: PHP syntax checker 7.3
uses: prestashop/github-action-php-lint/7.3@master
- name: PHP syntax checker 7.4
uses: prestashop/github-action-php-lint/7.4@master
- name: PHP syntax checker 8.0
uses: prestashop/github-action-php-lint/8.0@master
- name: PHP syntax checker 8.1
uses: prestashop/github-action-php-lint/8.1@master
- name: PHP syntax checker 8.2
uses: prestashop/github-action-php-lint/8.2@master
phpunit:
name: PHPUNIT
strategy:
matrix:
php-config:
- php-version: 5.6
phpunit-version: 5
- php-version: 7.1
phpunit-version: 7
- php-version: 7.2
phpunit-version: 7
- php-version: 7.3
phpunit-version: 9
- php-version: 7.4
phpunit-version: 9
- php-version: 8.0
phpunit-version: 9
- php-version: 8.1
phpunit-version: 10
- php-version: 8.2
phpunit-version: 11
runs-on: ubuntu-latest
steps:
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-config.php-version }}
- name: Checkout
uses: actions/checkout@v3
- name: Update dependencies
run: composer update
- name: Install dependencies
run: composer install
- name: Download and Run PHPUnit
run: |
wget -O phpunit https://phar.phpunit.de/phpunit-${{ matrix.php-config.phpunit-version }}.phar
chmod +x phpunit
./phpunit tests