Valinor/.github/workflows/quality-assurance.yml

46 lines
1.2 KiB
YAML
Raw Normal View History

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'
php-extensions: yaml
2021-11-28 17:43:02 +01:00
steps:
- name: Checkout
uses: actions/checkout@v3
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: Creating var directory
run: mkdir -p var/cache
- name: Cache QA results
uses: actions/cache@v3.0.8
2021-11-28 17:43:02 +01:00
with:
path: var/cache
key: ${{ runner.os }}-qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/quality-assurance.yml') }}
2021-11-28 17:43:02 +01:00
- name: Checking Composer
run: composer validate --strict
- uses: "ramsey/composer-install@v2"
2021-11-28 17:43:02 +01:00
- name: Running PHPStan
run: php vendor/bin/phpstan
- name: Running Psalm
run: php vendor/bin/psalm
2022-05-21 16:37:16 +02:00
- 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