Skip to content

Commit f592969

Browse files
committed
Composer QA scripts
1 parent 0fd8a07 commit f592969

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

composer.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,58 @@
3232
"platform": {
3333
"php": "7.2"
3434
}
35+
},
36+
"scripts": {
37+
"ensure-installed": "composer install --ansi -n -q",
38+
"cs": [
39+
"@ensure-installed",
40+
"php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating"
41+
],
42+
"cs-fix": [
43+
"@ensure-installed",
44+
"php-cs-fixer fix --config=.php_cs --ansi --verbose --allow-risky=yes --show-progress=estimating"
45+
],
46+
"unit": [
47+
"@ensure-installed",
48+
"phpunit --colors=always -c phpunit.xml.dist"
49+
],
50+
"unit-coverage": [
51+
"@ensure-installed",
52+
"phpunit --colors=always -c phpunit.xml.dist --coverage-text --coverage-html covHtml --coverage-clover ./build/logs/clover.xml"
53+
],
54+
"lint-php": [
55+
"@ensure-installed",
56+
"parallel-lint --exclude vendor ."
57+
],
58+
"qa-all": [
59+
"@lint-php",
60+
"@cs",
61+
"@unit"
62+
],
63+
"qa-all-coverage": [
64+
"@lint-php",
65+
"@cs",
66+
"@unit-coverage"
67+
],
68+
"qa-windows": [
69+
"@lint-php",
70+
"@cs",
71+
"@unit"
72+
],
73+
"qa-ci": [
74+
"@unit"
75+
],
76+
"qa-ci-extended": [
77+
"@qa-all-coverage"
78+
],
79+
"qa-ci-windows": [
80+
"@qa-windows"
81+
],
82+
"qa-contrib": [
83+
"@qa-all"
84+
],
85+
"ci-coverage": [
86+
"if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi"
87+
]
3588
}
3689
}

0 commit comments

Comments
 (0)