-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #501 from FriendsOfSymfony/github-phpstan
phpstan static analysis with github workflow
- Loading branch information
Showing
6 changed files
with
67 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Static analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan src | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Pull in optional dependencies | ||
run: | | ||
composer require --no-update symfony/http-kernel symfony/event-dispatcher symfony/process phpunit/phpunit psr/log toflar/psr6-symfony-http-cache-store | ||
composer update --no-dev --no-progress | ||
- name: PHPStan | ||
uses: docker://oskarstark/phpstan-ga | ||
with: | ||
args: analyze --no-progress | ||
|
||
phpstan-tests: | ||
name: PHPStan tests | ||
runs-on: ubuntu-latest | ||
env: | ||
REQUIRE_DEV: "true" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Pull in optional dependencies | ||
run: | | ||
composer require --no-update phpunit/phpunit toflar/psr6-symfony-http-cache-store | ||
composer update --no-progress | ||
- name: PHPStan | ||
uses: docker://oskarstark/phpstan-ga | ||
with: | ||
args: analyze --no-progress -c phpstan.tests.neon.dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
parameters: | ||
level: 1 | ||
paths: | ||
- src | ||
excludePaths: | ||
analyseAndScan: | ||
# contains code to support legacy phpunit versions | ||
# TODO: clean up the code in this namespace and support fewer phpunit versions | ||
- src/Test/* | ||
# contains BC code to support Symfony 3.4 that would not work with never versions | ||
- src/BaseEvent.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
parameters: | ||
level: 1 | ||
paths: | ||
- tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters