Skip to content

Commit

Permalink
Merge pull request #128 from FriendsOfCake/codecov
Browse files Browse the repository at this point in the history
Use codecov.
  • Loading branch information
ADmad committed Feb 13, 2016
2 parents e22d271 + 3b3779c commit a696d5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ matrix:
env: PHPCS=1 DEFAULT=0

- php: 7.0
env: COVERALLS=1 DEFAULT=0
env: CODECOVERAGE=1 DEFAULT=0

- php: hhvm
env: HHVM=1 DB=sqlite db_dsn='sqlite:///:memory:'
Expand All @@ -42,19 +42,18 @@ before_script:
- composer install --prefer-dist --no-interaction

- sh -c "if [ '$DB' = 'mysql' ]; then if [ '$DOCKER' = '1' ]; then apt-get -qq install -qq -y mysql-server && service mysql start; fi; 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 [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:dev-master; fi"

script:
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit --stderr; fi"

- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP --ignore=vendor --ignore=docs --ignore=tests/bootstrap.php . ; fi"

- sh -c "if [ '$COVERALLS' = '1' ]; then phpdbg -qrr vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml || true; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls -v; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml || true; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then bash codecov.sh; fi"

notifications:
email: false
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"cakephp/cakephp": "~3.0"
},
"require-dev": {
"phpunit/phpunit": "4.1.*",
"cakephp/cakephp-codesniffer": "dev-master"
"phpunit/phpunit": "4.1.*"
},
"support": {
"issues": "http://github.com/friendsofcake/bootstrap-ui/issues",
Expand Down
11 changes: 3 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@
</testsuite>
</testsuites>

<!-- Prevent coverage reports from looking in tests and vendors -->
<filter>
<blacklist>
<directory suffix=".php">./vendor/</directory>
<directory suffix=".ctp">./vendor/</directory>

<directory suffix=".php">./tests/</directory>
<directory suffix=".ctp">./tests/</directory>
</blacklist>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit a696d5a

Please sign in to comment.