Add fastfony/quality-pack (#1870)

* Add fastfony/quality-pack

* Add .PHONY target quality

* typo in filename to copy

* install elements now in recipe

* rename yml to yaml

* copy the directory
This commit is contained in:
neothone
2025-10-19 22:00:20 +02:00
committed by GitHub
parent 5c4e810d55
commit 51a11dbff2
4 changed files with 73 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
name: Quality Checks
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
security-check:
name: Security Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run Composer Security Audit
run: composer audit
phpstan:
name: PHPStan Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHPStan
run: vendor/bin/phpstan analyse src tests --no-progress --error-format=github

View File

@@ -0,0 +1,12 @@
<?php
use TwigCsFixer\Config\Config;
use TwigCsFixer\Ruleset\Ruleset;
$ruleset = new Ruleset();
$ruleset->addStandard(new \TwigCsFixer\Standard\TwigCsFixer());
$config = new Config();
$config->setRuleset($ruleset);
return $config;

View File

@@ -0,0 +1,7 @@
.PHONY: quality
quality:
composer audit
vendor/bin/php-cs-fixer fix
vendor/bin/twig-cs-fixer lint --fix templates/
vendor/bin/phpstan analyse src tests

View File

@@ -0,0 +1,6 @@
{
"copy-from-recipe": {
".twig-cs-fixer.dist.php": ".twig-cs-fixer.dist.php",
".github/": ".github/"
}
}