Blame | Last modification | View Log | Download
name: PHPon:push:branches:- masterpull_request:jobs:php-cs-fixer:name: PHP CS Fixerruns-on: ubuntu-lateststeps:- name: Setup PHPuses: shivammathur/setup-php@v2with:php-version: '7.4'extensions: xml- uses: actions/checkout@v4- name: Validate composer configrun: composer validate --strict- name: Composer Installrun: composer global require friendsofphp/php-cs-fixer- name: Add environment pathrun: export PATH="$PATH:$HOME/.composer/vendor/bin"- name: Run PHPCSFixerrun: php-cs-fixer fix --dry-run --diffphpstan:name: PHP Static Analysisruns-on: ubuntu-lateststrategy:fail-fast: falsematrix:php:- '7.1'- '7.2'- '7.3'- '7.4'- '8.0'- '8.1'- '8.2'- '8.3'steps:- name: Setup PHPuses: shivammathur/setup-php@v2with:php-version: ${{ matrix.php }}extensions: xml- uses: actions/checkout@v4- name: Composer Installrun: composer install --ansi --prefer-dist --no-interaction --no-progress- name: Run phpstanrun: ./vendor/bin/phpstan analyse -c phpstan.neon.distphpunit:name: PHPUnitruns-on: ubuntu-lateststrategy:fail-fast: falsematrix:php:- '7.1'- '7.2'- '7.3'- '7.4'- '8.0'- '8.1'- '8.2'- '8.3'steps:- name: Setup PHPuses: shivammathur/setup-php@v2with:php-version: ${{ matrix.php }}extensions: xmlcoverage: ${{ (matrix.php == '8.1') && 'xdebug' || 'none' }}- uses: actions/checkout@v4- name: Install dependenciesrun: composer install --ansi --prefer-dist --no-interaction --no-progress- name: Run PHPUnitif: matrix.php != '8.1'run: ./vendor/bin/phpunit -c phpunit.xml.dist- name: Run PHPUnit (w CodeCoverage)if: matrix.php == '8.1'run: XDEBUG_MODE=coverage ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/clover.xml- name: Upload coverage results to Coverallsif: matrix.php == '8.1'env:COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}run: |wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.pharchmod +x php-coveralls.pharphp php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv