cumulative update (#99) #95
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Test and analyze PHP | |
on: | |
push: {} | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php: "8.1" | |
phpunit: "10" | |
phpunit-config: "phpunit-10.xml.dist" | |
- php: "8.2" | |
phpunit: "11" | |
phpunit-config: "phpunit.xml.dist" | |
- php: "8.3" | |
phpunit: "11" | |
phpunit-config: "phpunit.xml.dist" | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "${{ matrix.php }}" | |
extensions: redis, apcu, ctype, dom, iconv, gd, mbstring, fileinfo, intl, json, mysql, bcmath, zip | |
coverage: none # disable xdebug, pcov | |
#ini-values: post_max_size=256M memory | |
tools: cs2pr, pecl, php-cs-fixer, vimeo/psalm, phpstan, phpcs | |
- uses: actions/checkout@v4 | |
- uses: "ramsey/composer-install@v3" | |
with: | |
composer-options: "--no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist -q" | |
- name: PHPUnit tests | |
uses: php-actions/phpunit@v3 | |
with: | |
version: "${{ matrix.phpunit }}" | |
php_version: "${{matrix.php}}" | |
configuration: "${{ matrix.phpunit-config }}" | |
memory_limit: "256M" | |
test_suffix: .php | |
- name: Run phpstan | |
run: phpstan analyse --error-format=checkstyle -c "phpstan.neon" | cs2pr | |
#- name: Run psalm | |
# run: psalm -c psalm.xml --output-format=github | |
- name: Check PHP code style | |
continue-on-error: true | |
run: phpcs --standard=phpcs.xml --parallel=2 --report-full --report-checkstyle=./phpcs-report.xml | |
- name: Show PHPCS results in PR | |
run: cs2pr ./phpcs-report.xml |