Skip to content

Commit

Permalink
Merge pull request #103 from djlambert/coveralls
Browse files Browse the repository at this point in the history
Replace CodeClimate coverage with Coveralls
  • Loading branch information
sadortun committed Nov 3, 2015
2 parents 90d8d2e + 7b436d6 commit d7213d3
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .codeclimate.yml
@@ -1,9 +1,10 @@
---
engines:
phpcodesniffer:
enabled: true
phpmd:
enabled: true
codeclimate-fixme
enabled: true
ratings:
paths:
- "**.php"
Expand Down
2 changes: 2 additions & 0 deletions .coveralls.yml
@@ -0,0 +1,2 @@
coverage_clover: ./build/logs/clover-*.xml
src_dir: lib
32 changes: 21 additions & 11 deletions .travis.yml
Expand Up @@ -10,27 +10,37 @@ php:
- hhvm

env:
- ORM=2.3
- ORM=2.4
- ORM=2.5
- DB=mysql ORM=2.3
- DB=mysql ORM=2.4
- DB=mysql ORM=2.5
- DB=pgsql ORM=2.3
- DB=pgsql ORM=2.4
- DB=pgsql ORM=2.5

before_script:
- composer self-update
- cp ./tests/travis/composer.orm$ORM.json ./composer.json
- composer install --prefer-source

script:
- DB=mysql ./vendor/bin/phpunit -v -c ./tests/travis/travis.mysql.xml --coverage-clover ./build/logs/clover-mysql.xml
- DB=pgsql ./vendor/bin/phpunit -v -c ./tests/travis/travis.pgsql.xml --coverage-clover ./build/logs/clover-pgsql.xml
- ./vendor/bin/phpunit -v -c ./tests/travis/travis.$DB.xml --coverage-clover ./build/logs/clover-$TRAVIS_PHP_VERSION-$ORM-$DB.xml

after_script:
- ./vendor/bin/test-reporter --coverage-report ./build/logs/clover-mysql.xml --coverage-report ./build/logs/clover-pgsql.xml
- ./vendor/bin/coveralls -v

matrix:
allow_failures:
- php: hhvm # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
- php: 7.0 # PHP 7 requires PHPUnit 5, work needed to support the later
notifications:
webhooks: https://coveralls.io/webhook?repo_token=$COVERALLS_WEBHOOK

matrix:
exclude:
- php: 7.0 # PHP 7 requires PHPUnit 5, work needed to support the later
- php: hhvm
env: DB=pgsql ORM=2.3 # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
- php: hhvm
env: DB=pgsql ORM=2.4 # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
- php: hhvm
env: DB=pgsql ORM=2.5 # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency
- php: 5.3
env: DB=mysql ORM=2.5 # ORM >=2.5 requires PHP >=5.4
- php: 5.3
env: ORM=2.5 # ORM >=2.5 requires PHP >=5.4
env: DB=pgsql ORM=2.5 # ORM >=2.5 requires PHP >=5.4
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -16,7 +16,7 @@
"require-dev": {
"phpunit/phpunit": ">=4.8",
"ramsey/array_column": "~1.1",
"codeclimate/php-test-reporter": "dev-master"
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-0": {
Expand Down
2 changes: 1 addition & 1 deletion tests/travis/composer.orm2.3.json
Expand Up @@ -16,7 +16,7 @@
"require-dev": {
"phpunit/phpunit": ">=4.8",
"ramsey/array_column": "~1.1",
"codeclimate/php-test-reporter": "@dev"
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-0": {
Expand Down
2 changes: 1 addition & 1 deletion tests/travis/composer.orm2.4.json
Expand Up @@ -16,7 +16,7 @@
"require-dev": {
"phpunit/phpunit": ">=4.8",
"ramsey/array_column": "~1.1",
"codeclimate/php-test-reporter": "@dev"
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-0": {
Expand Down
2 changes: 1 addition & 1 deletion tests/travis/composer.orm2.5.json
Expand Up @@ -16,7 +16,7 @@
"require-dev": {
"phpunit/phpunit": ">=4.8",
"ramsey/array_column": "~1.1",
"codeclimate/php-test-reporter": "@dev"
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-0": {
Expand Down

0 comments on commit d7213d3

Please sign in to comment.