Skip to content

Commit 607f2d0

Browse files
committed
Add phpstan and code style to pipeline
1 parent a46915e commit 607f2d0

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ jobs:
3636
restore-keys: dependencies-${{ matrix.php }}-${{ matrix.stability }}-composer-
3737
- name: Install dependencies
3838
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
39-
# - name: Check coding style
40-
# run: php-cs-fixer fix --dry-run --allow-risky=true --format=checkstyle | cs2pr
39+
- name: Check coding style
40+
run: composer run style:check -- --format=checkstyle | cs2pr
41+
- name: Check static analysis
42+
run: composer run analyze -- --error-format=checkstyle | cs2pr
4143
- name: Configure matchers for PHPUnit
4244
uses: mheap/phpunit-matcher-action@v1
43-
- name: Run PHP tests via PHPUnit
44-
run: vendor/bin/pest --teamcity
45+
- name: Run PHP tests
46+
run: composer run tests:ci

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"mockery/mockery": "^1.4.4",
3131
"orchestra/testbench": "^9.0",
3232
"pestphp/pest": "^2.28",
33-
"phpstan/phpstan": "^2.0"
33+
"phpstan/phpstan": "^2.0",
34+
"staabm/annotate-pull-request-from-checkstyle": "^1.8"
3435
},
3536
"autoload": {
3637
"psr-4": {
@@ -53,6 +54,9 @@
5354
"tests": [
5455
"rm -rf build",
5556
"XDEBUG_MODE=coverage php vendor/bin/pest"
57+
],
58+
"tests:ci": [
59+
"vendor/bin/pest --teamcity"
5660
]
5761
},
5862
"extra": {

0 commit comments

Comments
 (0)