-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqa.yaml
More file actions
107 lines (90 loc) · 2.47 KB
/
qa.yaml
File metadata and controls
107 lines (90 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# PHP Quality Assurance Pipeline
# This file defines the QA process for `core php qa` command
#
# Usage: core php qa [--fix] [--full]
# --fix Apply automatic fixes where possible
# --full Run full suite including slow checks (mutation testing)
name: PHP Quality Assurance
version: 1.0.0
# Tool versions and config files
tools:
pint:
config: pint.json
description: Code style (PSR-12 + Laravel conventions)
phpstan:
config: phpstan.neon
level: 1
description: Static analysis (type checking)
psalm:
config: psalm.xml
level: 8
description: Static analysis (deeper type inference)
infection:
config: infection.json5
description: Mutation testing (test quality)
rector:
config: rector.php
description: Automated refactoring and upgrades
# QA Pipeline stages
stages:
# Stage 1: Quick checks (< 30 seconds)
quick:
- name: Security Audit
command: composer audit
description: Check dependencies for known vulnerabilities
fix: false
- name: Code Style
command: ./vendor/bin/pint --test
fix_command: ./vendor/bin/pint
description: Check PSR-12 and Laravel code style
- name: PHPStan
command: ./vendor/bin/phpstan analyse --no-progress
description: Static analysis level 1
fix: false
# Stage 2: Standard checks (< 2 minutes)
standard:
- name: Psalm
command: ./vendor/bin/psalm --no-progress
description: Deep static analysis
fix: false
- name: Tests
command: ./vendor/bin/phpunit --testdox
description: Run test suite
fix: false
# Stage 3: Full checks (can be slow)
full:
- name: Rector (dry-run)
command: ./vendor/bin/rector process --dry-run
fix_command: ./vendor/bin/rector process
description: Check for automated improvements
- name: Mutation Testing
command: ./vendor/bin/infection --min-msi=50 --min-covered-msi=70 --threads=4
description: Test suite quality via mutation testing
fix: false
slow: true
# Exit codes
exit_codes:
0: All checks passed
1: Code style issues (fixable)
2: Static analysis errors
3: Test failures
4: Security vulnerabilities
5: Mutation score too low
# Recommended CI configuration
ci:
# Run on every push
push:
- quick
- standard
# Run on PRs to main
pull_request:
- quick
- standard
- full
# Thresholds
thresholds:
phpstan_level: 1
psalm_level: 8
test_coverage: 70
mutation_msi: 50
mutation_covered_msi: 70