Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move cakephp-codesniffer into require-dev, use CakePHP standard #12

Merged
merged 3 commits into from
Dec 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,23 @@ env:
- DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test'
- DB=sqlite db_dsn='sqlite:///:memory:'
global:
- INSTALL_DEPS=1
- RUN_TESTS=1

matrix:
fast_finish: true

include:
- php: 5.4
env: RUN_CS=1 RUN_TESTS=0 INSTALL_DEPS=0
env: RUN_CS=1 RUN_TESTS=0

- php: 5.4
env: RUN_COVERAGE=1 RUN_TESTS=0 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test'

allow_failures:
- php: 5.4
env: RUN_CS=1 RUN_TESTS=0 INSTALL_DEPS=0

before_script:
- sh -c "if [ '$INSTALL_DEPS' = '1' ]; then composer self-update; fi"
- sh -c "if [ '$INSTALL_DEPS' = '1' ]; then composer install --no-interaction --dev; fi"
- composer self-update
- composer install --no-interaction --dev
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then composer require 'squizlabs/php_codesniffer=*'; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then mkdir -p build/logs; fi"

Expand All @@ -44,7 +38,7 @@ before_script:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed the INSTALL_DEPS for the CS build. Fixed.

script:
- sh -c "if [ '$RUN_TESTS' = '1' ]; then phpunit --stderr; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./src ./tests; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then ./vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then phpunit --stderr --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$RUN_COVERAGE' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi"

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"cakephp/cakephp": "3.0.x-dev"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "2.0.*-dev",
"phpunit/phpunit": "*"
},
"autoload": {
Expand Down