2021-11-28 17:43:02 +01:00
|
|
|
name: Coding Standards & Static Analysis
|
2021-11-29 13:24:11 +01:00
|
|
|
on: [push, pull_request]
|
2021-11-28 17:43:02 +01:00
|
|
|
jobs:
|
|
|
|
qa:
|
|
|
|
name: Quality Assurance
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2021-11-29 13:24:11 +01:00
|
|
|
php-version: '8.1'
|
2021-11-28 17:43:02 +01:00
|
|
|
php-extensions: xdebug, yaml
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-07 07:16:46 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-11-28 17:43:02 +01:00
|
|
|
|
2021-11-29 13:24:11 +01:00
|
|
|
- name: Setup cache environment
|
|
|
|
id: extcache
|
|
|
|
uses: shivammathur/cache-extensions@v1
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php }}
|
|
|
|
extensions: ${{ env.php-extensions }}
|
|
|
|
key: qa-php-extensions-${{ runner.os }}-${{ env.php-version }}
|
2021-11-28 17:43:02 +01:00
|
|
|
|
2021-11-29 13:24:11 +01:00
|
|
|
- name: Cache PHP extensions
|
2022-05-04 19:46:14 +02:00
|
|
|
uses: actions/cache@v3.0.2
|
2021-11-29 13:24:11 +01:00
|
|
|
with:
|
|
|
|
path: ${{ steps.extcache.outputs.dir }}
|
|
|
|
key: ${{ steps.extcache.outputs.key }}
|
|
|
|
restore-keys: ${{ steps.extcache.outputs.key }}
|
2021-11-28 17:43:02 +01:00
|
|
|
|
|
|
|
- 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 PHPStan results
|
2022-05-04 19:46:14 +02:00
|
|
|
uses: actions/cache@v3.0.2
|
2021-11-28 17:43:02 +01:00
|
|
|
with:
|
|
|
|
path: var/cache/phpstan
|
|
|
|
key: phpstan
|
|
|
|
|
2022-01-11 19:06:09 +01:00
|
|
|
- name: Checking Composer
|
2022-04-06 18:28:46 +02:00
|
|
|
run: composer validate --strict
|
2022-01-11 19:06:09 +01:00
|
|
|
|
2021-11-28 17:43:02 +01:00
|
|
|
- name: Creating var directory
|
|
|
|
run: mkdir -p var/cache
|
|
|
|
|
2022-01-11 16:17:53 +01:00
|
|
|
- uses: "ramsey/composer-install@v2"
|
|
|
|
|
2021-11-28 17:43:02 +01:00
|
|
|
- name: Running PHP Coding Standards Fixer
|
2021-12-15 13:16:50 +01:00
|
|
|
run: php vendor/bin/php-cs-fixer fix --dry-run
|
2021-11-28 17:43:02 +01:00
|
|
|
|
|
|
|
- name: Running PHPStan
|
|
|
|
run: php vendor/bin/phpstan
|
2022-01-11 16:17:53 +01:00
|
|
|
|
|
|
|
- name: Running Psalm
|
|
|
|
run: php vendor/bin/psalm
|