Valinor/.github/workflows/quality-assurance.yml
2022-07-10 19:20:27 +02:00

46 lines
1.1 KiB
YAML

name: Coding Standards & Static Analysis
on: [push, pull_request]
jobs:
qa:
name: Quality Assurance
runs-on: ubuntu-latest
env:
php-version: '8.1'
php-extensions: xdebug, yaml
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: ${{ env.php-extensions }}
ini-values: zend.assertions=1
- name: Cache QA results
uses: actions/cache@v3.0.4
with:
path: var/cache
key: qa-${{ hashFiles('composer.lock') }}
- name: Checking Composer
run: composer validate --strict
- name: Creating var directory
run: mkdir -p var/cache
- uses: "ramsey/composer-install@v2"
- name: Running PHPStan
run: php vendor/bin/phpstan
- name: Running Psalm
run: php vendor/bin/psalm
- name: Running PHP Coding Standards Fixer
run: php vendor/bin/php-cs-fixer fix --dry-run
- name: Running Rector
run: php vendor/bin/rector --dry-run