Skip to content

Commit

Permalink
Start versioning composer.lock and use it for CS/SA analysis on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Majkl578 committed Mar 5, 2018
1 parent 625df93 commit 62dc422
Show file tree
Hide file tree
Showing 5 changed files with 2,524 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.travis.yml export-ignore
phpmd.xml.dist export-ignore
phpunit.xml.dist export-ignore
composer.lock export-ignore
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
phpunit.xml
composer.lock
build
vendor
coverage.clover
Expand Down
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ php:

before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update
- travis_retry composer self-update

install: travis_retry composer update --prefer-dist
install:
- rm composer.lock
- travis_retry composer update --prefer-dist

script:
- ./vendor/bin/phpunit -v
Expand All @@ -26,23 +28,24 @@ jobs:
script:
- ./vendor/bin/phpunit -v --coverage-clover ./build/logs/clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
- travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

- stage: Coding Standard
php: 7.1
install: travis_retry composer install --prefer-dist
script: ./vendor/bin/phpcs

- stage: Static Analysis
php: 7.1
install: composer require "phpstan/phpstan:^0.9.2" --dev
install: travis_retry composer install --prefer-dist
script:
- ./vendor/bin/phpstan analyse -c phpstan.neon -l max src
- ./vendor/bin/phpstan analyse -c phpstan.tests.neon -l max tests

- stage: Benchmark
php: 7.1
install: composer require "phpbench/phpbench:^0.13.0" --dev
install: travis_retry composer require "phpbench/phpbench:^0.13.0" --dev
script: php -n ./vendor/bin/phpbench run --iterations=3 --warmup=1 --report=aggregate

cache:
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"ext-phar": "*",
"ext-pdo": "*",
"doctrine/coding-standard": "^4.0",
"phpstan/phpstan-shim": "^0.9.2",
"phpunit/phpunit": "^7.0"
},
"autoload": {
Expand Down
Loading

0 comments on commit 62dc422

Please sign in to comment.