Skip to content

Commit

Permalink
Add phpstan and code style to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
cviebrock committed Nov 29, 2024
1 parent a46915e commit 607f2d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ jobs:
restore-keys: dependencies-${{ matrix.php }}-${{ matrix.stability }}-composer-
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
# - name: Check coding style
# run: php-cs-fixer fix --dry-run --allow-risky=true --format=checkstyle | cs2pr
- name: Check coding style
run: composer run style:check -- --format=checkstyle | cs2pr
- name: Check static analysis
run: composer run analyze -- --error-format=checkstyle | cs2pr
- name: Configure matchers for PHPUnit
uses: mheap/phpunit-matcher-action@v1
- name: Run PHP tests via PHPUnit
run: vendor/bin/pest --teamcity
- name: Run PHP tests
run: composer run tests:ci
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"mockery/mockery": "^1.4.4",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.28",
"phpstan/phpstan": "^2.0"
"phpstan/phpstan": "^2.0",
"staabm/annotate-pull-request-from-checkstyle": "^1.8"
},
"autoload": {
"psr-4": {
Expand All @@ -53,6 +54,9 @@
"tests": [
"rm -rf build",
"XDEBUG_MODE=coverage php vendor/bin/pest"
],
"tests:ci": [
"vendor/bin/pest --teamcity"
]
},
"extra": {
Expand Down

0 comments on commit 607f2d0

Please sign in to comment.