Skip to content

Commit f3eee0e

Browse files
committed
Adjust test configs
1 parent 3b4070d commit f3eee0e

File tree

5 files changed

+33
-5
lines changed

5 files changed

+33
-5
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- run: composer update --no-progress
2323

24-
- run: vendor/bin/phpcs --standard=psr2 -q --report=checkstyle src | cs2pr
24+
- run: vendor/bin/phpcs -q --report=checkstyle src | cs2pr
2525

2626
phpunit:
2727
name: PHPUnit on ${{ matrix.php }} ${{ matrix.composer-flags }}
@@ -80,4 +80,4 @@ jobs:
8080

8181
- run: composer update --no-progress
8282

83-
- run: vendor/bin/phpstan analyse -l 3 src --no-progress
83+
- run: vendor/bin/phpstan analyse --no-progress

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.idea
2+
.phpunit.result.cache
23
build
34
composer.lock
5+
phpcs.xml
6+
phpunit.xml
47
vendor

composer.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@
4747
},
4848
"bin": ["bin/json5"],
4949
"scripts": {
50-
"test": "simple-phpunit",
51-
"check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src test",
52-
"fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src test"
50+
"test": [
51+
"@phpunit",
52+
"@check-style",
53+
"@phpstan"
54+
],
55+
"phpunit": "simple-phpunit",
56+
"phpstan": "phpstan analyse",
57+
"check-style": "phpcs",
58+
"fix-style": "phpcbf"
5359
},
5460
"extra": {
5561
"branch-alias": {

phpcs.xml.dist

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<arg name="basepath" value="."/>
4+
<arg name="extensions" value="php"/>
5+
<arg name="colors"/>
6+
7+
<!-- Ignore warnings, show progress of the run and show sniff names -->
8+
<arg value="nps"/>
9+
10+
<!-- Directories to be checked -->
11+
<file>src</file>
12+
<file>test</file>
13+
14+
<rule ref="PSR2"/>
15+
</ruleset>

phpstan.neon.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 3
3+
paths:
4+
- src

0 commit comments

Comments
 (0)