Introduce generics to describe Map
classes
#240
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: Code quality | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
static-analysis: | |
name: "Code quality checks" | |
runs-on: "ubuntu-20.04" | |
strategy: | |
matrix: | |
php-version: | |
- "8.1" | |
steps: | |
- name: "Checkout code" | |
uses: "actions/checkout@v4" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "none" | |
php-version: "${{ matrix.php-version }}" | |
tools: "cs2pr" | |
- name: "Install dependencies with Composer" | |
uses: "ramsey/composer-install@v2" | |
- name: "Require tools" | |
continue-on-error: true | |
run: | | |
composer config --no-plugins allow-plugins.phpstan/extension-installer true | |
composer require --ansi --dev "vimeo/psalm:^5.15" "phpstan/phpstan:>=2" "phpstan/extension-installer:>=1.4" "phpstan/phpstan-phpunit:>=1.4" "squizlabs/php_codesniffer:>=3.7" "phpunit/phpunit:>=10" | |
- name: "Run static analysis with phpstan/phpstan" | |
run: "vendor/bin/phpstan" | |
- name: "Run static analysis with vimeo/psalm" | |
run: ./vendor/bin/psalm --shepherd | |
- name: "Run code style check with squizlabs/php_codesniffer" | |
run: ./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1 |