Skip to content

Commit 51a11db

Browse files
authored
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
1 parent 5c4e810 commit 51a11db

4 files changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Quality Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
security-check:
13+
name: Security Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: '8.2'
23+
coverage: none
24+
25+
- name: Install dependencies
26+
run: composer install --prefer-dist --no-progress
27+
28+
- name: Run Composer Security Audit
29+
run: composer audit
30+
31+
phpstan:
32+
name: PHPStan Analysis
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
38+
- name: Setup PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: '8.2'
42+
coverage: none
43+
44+
- name: Install dependencies
45+
run: composer install --prefer-dist --no-progress
46+
47+
- name: Run PHPStan
48+
run: vendor/bin/phpstan analyse src tests --no-progress --error-format=github
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
use TwigCsFixer\Config\Config;
4+
use TwigCsFixer\Ruleset\Ruleset;
5+
6+
$ruleset = new Ruleset();
7+
$ruleset->addStandard(new \TwigCsFixer\Standard\TwigCsFixer());
8+
9+
$config = new Config();
10+
$config->setRuleset($ruleset);
11+
12+
return $config;

fastfony/quality-pack/1.0/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.PHONY: quality
2+
3+
quality:
4+
composer audit
5+
vendor/bin/php-cs-fixer fix
6+
vendor/bin/twig-cs-fixer lint --fix templates/
7+
vendor/bin/phpstan analyse src tests
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"copy-from-recipe": {
3+
".twig-cs-fixer.dist.php": ".twig-cs-fixer.dist.php",
4+
".github/": ".github/"
5+
}
6+
}

0 commit comments

Comments
 (0)