Skip to content

Commit

Permalink
ci: run also phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
konecnyjakub committed Feb 10, 2017
1 parent cc3301b commit c08c0e5
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 10 deletions.
12 changes: 7 additions & 5 deletions .gitlab-ci.yml
@@ -1,4 +1,4 @@
image: shipito/php:5.6
image: shipito/php:7.0

stages:
- build
Expand Down Expand Up @@ -31,6 +31,12 @@ analyze:cs:
script:
- ./vendor/bin/phpcs --extensions=php,phpt . --standard=vendor/nexendrie/code-quality/ruleset.xml --colors

analyze:phpstan:
stage: analyze

script:
- ./vendor/bin/phpstan analyze -l 5 -c phpstan.neon src tests

.job_template: &test_job
stage: test

Expand All @@ -40,10 +46,6 @@ analyze:cs:
test:default:
<<: *test_job

test:php70:
image: shipito/php:7.0
<<: *test_job

test:php71:
image: shipito/php:7.1
<<: *test_job
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,7 +1,6 @@
language: php

php:
- 5.6
- 7.0
- 7.1

Expand Down Expand Up @@ -29,6 +28,7 @@ install:
script:
- if [ "$TESTER_PHP_BIN" = "php" ]; then ./vendor/bin/parallel-lint src tests -e php,phpt; fi
- if [ "$TESTER_PHP_BIN" = "php" ]; then ./vendor/bin/phpcs --extensions=php,phpt . --standard=vendor/nexendrie/code-quality/ruleset.xml --colors; fi
- if [ "$TESTER_PHP_BIN" = "php" ]; then ./vendor/bin/phpstan analyze -l 5 -c phpstan.neon src tests; fi
- ./vendor/bin/run-tests -p $TESTER_PHP_BIN tests -s $coverage

after_script:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -28,7 +28,8 @@
"nette/di": "^2.4",
"tracy/tracy": "^2.4",
"symfony/yaml": "^3.1",
"nette/neon": "^2.4"
"nette/neon": "^2.4",
"phpstan/phpstan-nette": "^0.6.2"
},
"suggest": {
"nette/di": "To use TranslationExtension",
Expand Down
108 changes: 105 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions phpstan.neon
@@ -0,0 +1,10 @@
includes:
- vendor/phpstan/phpstan-nette/extension.neon
parameters:
excludes_analyse:
- %rootDir%/../../../tests/_temp/*
fileExtensions:
- php
- phpt
autoload_directories:
- %rootDir%/../../../tests

0 comments on commit c08c0e5

Please sign in to comment.