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' into develop
Browse files Browse the repository at this point in the history
Close #8
Close #12
Close #13
Close #14
  • Loading branch information
weierophinney committed Mar 27, 2018
2 parents 9541083 + 5d22ab5 commit 6dbdced
Show file tree
Hide file tree
Showing 17 changed files with 1,789 additions and 149 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
src_dir: src
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
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.

62 changes: 34 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,60 @@ branches:
cache:
directories:
- $HOME/.composer/cache
- $HOME/.local
- zf-mkdoc-theme

env:
global:
- SITE_URL: https://zendframework.github.io/zend-dom
- GH_USER_NAME: "Matthew Weier O'Phinney"
- GH_USER_EMAIL: [email protected]
- GH_REF: github.com/zendframework/zend-dom.git
- secure: "s5/0nwMgJT6tDIAdPNbQhre95SCbs3LZf6o6rj4aX39LWyBCWFwI2VuRoh+2NQdhmAiwtE5YNmXeuL27MAQHCy6vfQkkE4cNmQa/vFwBr+ewUKjjCRrdAPoymq6D6G4Txk3Mu45juWb/O6fXZjWWUPMSwfC9CZX+J4rZzvQS3tnOyKk79gHf3P36dZwvzUe7XDcM98SFQIVCl8CXrNX5aQFcfDozaC+6k+hw4J5cyHKMBKVD0cb4cCKwmiLn9htJU8xOeL5DM9L4+zXroM3fmNpDPS3iXjhqgkAHU2c9zmJsf6pl0GLERYXpo8nd3Y/I9D5BCf7Qs5EgypEqJi41WhZ7OKZL7bBgIMP9hNQo5KTfc1Myu6JRzh4E8MwCSV5glMeEbEoX3SGtDcYfORxl2I8lSD5dRo/5E28SieKAVoZrkWHAtXJtRrx7vVOZ7hYvYUo53N7iTdY/7vzBewrbjTdzVUaHe+/S9OIFiLrAoYmlOGdX4b+q6Wly1m4P9i8CVHqDoVgVRA7F/qx3g0EK97HAI6wgiiMPPwWqZFRsGbXmaUHk4Fc/wkwuCjHWpw+2V3H8MTU0nQoU7ew5AFKKvm0d8erINoApGJziLYprcX79G1VzlHPWeCI3qi8j3r/5HQy5amEMCgUy9gyuFkFG/IAx/k9K36TmIjEtvudzt2o="
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"

matrix:
fast_finish: true
include:
- php: 5.5
- php: 5.6
env:
- EXECUTE_CS_CHECK=true
- DEPS=lowest
- php: 5.6
- DEPS=locked
- TEST_COVERAGE=true
- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=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"
- DEPS=latest
- php: 7
- php: hhvm
allow_failures:
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- CHECK_CS=true
- php: 7
env:
- DEPS=latest
- php: hhvm
env:
- DEPS=lowest
- php: hhvm
env:
- DEPS=locked
- php: hhvm
env:
- DEPS=latest
allow_failures:
- php: hhvm

notifications:
irc: "irc.freenode.org#zftalk.dev"
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

after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer upload-coverage ; fi
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
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
18 changes: 14 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
"require": {
"php": ">=5.5"
"php": "^5.6 || ^7.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -29,7 +29,17 @@
}
},
"require-dev": {
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/PHPUnit": "~4.0"
"phpunit/PHPUnit": "~4.0",
"zendframework/zend-coding-standard": "~1.0.0"
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
}
}
}
Loading

0 comments on commit 6dbdced

Please sign in to comment.