Merge pull request #137 from Exile37/feature/codacy_scrutinizer_code_coverage

Codacy / Scrutinizer / Code Climate / Coveralls integration, Slack hook to Travis CI
This commit is contained in:
Yuriy Pikhtarev 2017-02-05 21:53:17 +03:00 committed by GitHub
commit 8ce0f4da58
6 changed files with 66 additions and 4 deletions

24
.codeclimate.yml Normal file
View file

@ -0,0 +1,24 @@
engines:
csslint:
enabled: true
duplication:
enabled: true
config:
languages:
- javascript
- php
eslint:
enabled: true
fixme:
enabled: true
phpmd:
enabled: true
ratings:
paths:
- "**.css"
- "**.inc"
- "**.js"
- "**.jsx"
- "**.module"
- "**.php"
exclude_paths: []

3
.coveralls.yml Normal file
View file

@ -0,0 +1,3 @@
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
service_name: travis-ci

View file

@ -30,3 +30,6 @@ coding_style:
spaces:
around_operators:
concatenation: true
tools:
external_code_coverage: true

View file

@ -5,16 +5,44 @@ php:
- 7.1
- hhvm
env:
global:
# Codacy
- secure: "SGpMIBqxA+7L3aDPuBWjoCZDrZh/cpxAkY7CWd7I+k/VVAgLWhUiYHWAf0FqzLjzogfgvQCZyWRJWKAXPv/gVRXsJkmpQu9+gzLuOOwW6WZUwE0w8L3+xV9vupZpeMhe4QkWxxHzH/B2X8R6oqQdc7dJXl7Q8+Gwag6wavBsU+k="
# Code Climate
- secure: "A3c2mhe9lws+R40F4eltU0dzZfnra/h4fGXIYIhHvNfNWdhn88xp1tsuH/CGgj7gcNtp7nliwKQFyO8fPWr3LfpQFn9Vol3NSW8mJcg/8KCBPWTJmR9w9h3tPzJMW3q5w+TvUwXEFekyPIYgQ1k3DSzSi2fTNUWrsKMofiGJUqc="
matrix:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""
matrix:
allow_failures:
- php: hhvm
notifications:
slack:
secure: "ManLobpQIesTlURzcGocIlRLLRfxMcAgnzZOJu9OiEGB3+usgmforhEv5cXIexyy6HnOA1S0NMrUlWnCL90kViT3vlLC+afMPjcUBA1IyiP2ITRqLzFrgB3PhhiZGjNUarKDElj/b+9a5eWRHvOTYnbRK9vTakNOtid83V05CJ8="
before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction
- travis_retry composer install --no-interaction --prefer-dist
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-clover=coverage.xml
- mkdir -p build/logs
- vendor/bin/phpunit --configuration phpunit.xml --coverage-clover=build/logs/clover.xml
after_script:
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then php vendor/bin/codacycoverage clover build/logs/clover.xml; fi
- php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml
- php vendor/bin/coveralls -v
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then php vendor/bin/test-reporter; fi
after_success:
- bash <(curl -s https://codecov.io/bash)
addons:
hosts:
- tp.dev
- xn--o1af.xn--b1add
code_climate:
repo_token: $CODECLIMATE_REPO_TOKEN

View file

@ -65,9 +65,13 @@
"doctrine/cache": "^1.6"
},
"require-dev": {
"codacy/coverage": "dev-master",
"codeclimate/php-test-reporter": "dev-master",
"phpunit/phpunit": "^5.0",
"squizlabs/php_codesniffer": "2.7.*",
"sebastian/phpcpd": "2.0.*"
"satooshi/php-coveralls" : "^1.0",
"sebastian/phpcpd": "2.0.*",
"scrutinizer/ocular": "^1.3",
"squizlabs/php_codesniffer": "2.7.*"
},
"autoload": {
"psr-4": {

View file