Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/qa-tools'
Browse files Browse the repository at this point in the history
Close #20
Close #28
Close #29
Close #33
Close #37
  • Loading branch information
weierophinney committed Jan 25, 2018
2 parents 00b5bb2 + 05115ff commit f25a597
Show file tree
Hide file tree
Showing 30 changed files with 2,176 additions and 331 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml
@@ -1,3 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
src_dir: src
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -9,9 +9,7 @@ nbproject
doc/html/
tmp/
zf-mkdoc-theme/

clover.xml
composer.lock
coveralls-upload.json
phpunit.xml
vendor
45 changes: 0 additions & 45 deletions .php_cs

This file was deleted.

59 changes: 34 additions & 25 deletions .travis.yml
Expand Up @@ -15,37 +15,46 @@ cache:

env:
global:
- SITE_URL: https://zendframework.github.io/zend-console
- GH_USER_NAME: "Matthew Weier O'Phinney"
- GH_USER_EMAIL: matthew@weierophinney.net
- GH_REF: github.com/zendframework/zend-console.git
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
- SITE_URL="https://zendframework.github.io/zend-console"
- GH_USER_NAME="Matthew Weier O'Phinney"
- GH_USER_EMAIL="matthew@weierophinney.net"
- GH_REF="github.com/zendframework/zend-console.git"
- secure: "can3MouUZEPZnJUSetVwM7dZ4Wm876zomJnY2PpbWheZm1vE9nEFIVntk5oL4GJfHd2rr8l3Ot2o/IeD//8Zvinf0lVqaX8sPgq8xLcKSozeIiSzblbGKVCwDHZO5LnKTyXo+dWgKRziajBd4A6cNeO1s7srrYlroF/G4gajf29KAXJhQ8b2JtwIgjpK/n7M9pACBwzDs+5BcGfKLh6KhNJQv41tTzH69+9wMV1Lsn2ksA/CJoOGWKO0EJyu7FcXh7PugfqfmW988074WnJ57pPsOToLrYUHtaIh/6iv6S9/yYXqYw+Pdjkc3SJvWRfnAvvOaASkRsQT2jD3NknLrK0tbu7Z0EWfHYdTpAqsX9S0u/vAeyQKxG/5SotWwLH9zUxgoPgZ4rnVZwoVkOxv1rzOD/28CNToaQZ/GDQTsaEvLNg51TGCMmmyJDzK4p7WSVxLKmiM106SGj/H3brmTr0l32u8itvyfyZaJwIk7aQP/xIFgqA/qpApd/ykSTRs7u8CIj1PhdRP6FyYwUc+xn8d9Ylat1NoKJI4P6BajuUEPCij8joowb0ep05DgIMGqgU8aHuCBeIz0RiWQrbn4V9pzchVFfmd5KCUV87hoCsXYo1RNVDW4kpaOj7OG9R1tKSHVmyHmmKgy8dElYQrDIQDDgDEWFUxzE9gMQb4vQM="

matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
env:
- EXECUTE_CS_CHECK=true
- DEPS=lowest
- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=true
- DEPS=locked
- TEST_COVERAGE=true
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 5.6
env:
- DEPS=latest
- php: 7
- php: hhvm
- php: 5.5
env:
- EXCLUDE_VALIDATOR=true
- php: 5.6
- DEPS=lowest
- php: 7
env:
- EXCLUDE_VALIDATOR=true
- DEPS=locked
- CS_CHECK=true
- php: 7
env:
- EXCLUDE_VALIDATOR=true
- php: hhvm
- DEPS=latest
- php: hhvm
env:
- DEPS=lowest
- php: hhvm
env:
- DEPS=locked
- php: hhvm
env:
- EXCLUDE_VALIDATOR=true
- DEPS=latest
allow_failures:
- php: hhvm

Expand All @@ -54,21 +63,21 @@ notifications:
email: false

before_install:
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- composer self-update
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi

install:
- travis_retry composer install --no-interaction --ignore-platform-reqs
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS satooshi/php-coveralls:^1.0 ; fi
- travis_retry composer install $COMPOSER_ARGS
- composer show

script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Expand Up @@ -77,24 +77,24 @@ To do so:

## Running Coding Standards Checks

This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
standards checks, and provides configuration for our selected checks.
`php-cs-fixer` is installed by default via Composer.
`phpcs` is installed by default via Composer.

To run checks only:

```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs
$ composer cs-check
```

To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run`
flag:
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`:


```console
$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs
$ composer cs-fix
```

If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
they pass, and make sure you add and commit the changes after verification.

## Recommended Workflow for Contributions
Expand Down
19 changes: 15 additions & 4 deletions composer.json
Expand Up @@ -24,18 +24,29 @@
}
},
"require": {
"php": "^5.5 || ^7.0",
"php": "^5.6 || ^7.0",
"zendframework/zend-stdlib": "^2.7 || ^3.0"
},
"require-dev": {
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/PHPUnit": "^4.0",
"phpunit/PHPUnit": "^4.8",
"zendframework/zend-filter": "^2.6",
"zendframework/zend-json": "^2.6",
"zendframework/zend-validator": "^2.6"
"zendframework/zend-validator": "^2.6",
"zendframework/zend-coding-standard": "~1.0.0"
},
"suggest": {
"zendframework/zend-filter": "To support DefaultRouteMatcher usage",
"zendframework/zend-validator": "To support DefaultRouteMatcher usage"
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
}
}

0 comments on commit f25a597

Please sign in to comment.