Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add phpstan in CI #129

Merged
merged 15 commits into from
Nov 13, 2024
13 changes: 2 additions & 11 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,8 @@ jobs:
- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test
run: composer test
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,19 @@
"guzzlehttp/guzzle": "^6.0 | ^7.0",
"phpunit/phpunit": "^7.0 | ^9.0",
"shoppingfeed/coding-style-php": "~2.1.0",
"overtrue/phplint": "^1.1"
"overtrue/phplint": "^1.1",
"phpstan/phpstan": "~1.4.0"
},
"scripts": {
"test": [
"@tests-unit",
"@phpstan",
"@phpcs"
],
"tests-unit": "vendor/bin/phpunit",
"phpcs": "vendor/bin/sfcs src --progress -vvv",
"phpcsfix": "vendor/bin/sfcs src --progress -vvv --autofix"
"phpcsfix": "vendor/bin/sfcs src --progress -vvv --autofix",
"phpstan": "vendor/bin/phpstan analyse"
},
"scripts-descriptions": {
"test" : "Run PHPUnit tests suites and Coding standards validator"
Expand Down
Loading