Skip to content

Commit 7270a6d

Browse files
committed
Add phpstan to CI
1 parent 11d4d3f commit 7270a6d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/run-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ jobs:
4242
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest --with-all-dependencies
4343
4444
- name: Execute Unit Tests
45-
run: vendor/bin/phpunit
45+
run: composer test
46+
47+
- name: Analyse with PHPStan
48+
run: composer analyse
49+
if: matrix.os == 'ubuntu-latest'
4650

4751
- name: Check PSR-12 Codestyle
48-
run: vendor/bin/phpcs --standard=psr12 --exclude=Generic.Files.LineLength src/
52+
run: composer test
4953
if: matrix.os == 'ubuntu-latest'

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"scripts": {
3434
"test": "phpunit",
35-
"analyse": "vendor/bin/phpstan analyse src tests --level=4",
35+
"analyse": "phpstan analyse src tests --level=4",
3636
"check-style": "phpcs -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
3737
"fix-style": "phpcbf -p --standard=PSR12 --exclude=Generic.Files.LineLength --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
3838
},

0 commit comments

Comments
 (0)