Skip to content

Commit

Permalink
FIX: Cut down on the amount of coverage reported, use just one test
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonbanderson committed Jan 18, 2016
1 parent 3ff15e0 commit 6275063
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .travis.yml
Expand Up @@ -7,34 +7,33 @@ addons:
packages:
- tidy

php:
- 5.3
- 5.4
- 5.5
- 5.6

before_install:
- pip install --user codecov

env:
global:
- DB=MYSQL CORE_RELEASE=3.1
- MODULE_PATH=indexlastedited
- COVERAGE=0

matrix:
allow_failures:
- php: hhvm-nightly
include:
- php: 5.6
env: DB=MYSQL
- php: 5.6
env: DB=PGSQL
- php: 5.6
env: DB=SQLITE
- php: 5.5
env: DB=MYSQL
- php: 5.4
env: DB=MYSQL
- php: 5.3
env: DB=MYSQL
- php: hhvm
env: DB=MYSQL
- php: 5.6
env: DB=MYSQL CORE_RELEASE=3.2
env: DB=MYSQL CORE_RELEASE=3.2 COVERAGE=1
- php: 5.6
env: DB=PGSQL CORE_RELEASE=3.2
- php: 5.6
Expand All @@ -58,11 +57,14 @@ before_script:
- composer require satooshi/php-coveralls

script:
- vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/
# Execute tests with no coverage. This is the fastest option
- "if [ \"$COVERAGE\" = \"0\" ]; then vendor/bin/phpunit $MODULE_PATH/tests/; fi"

# Execute tests with coverage. Do this for a small
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/; fi"

after_success:
- mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/
after_script:
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi"
- cd ~/build/$TRAVIS_REPO_SLUG
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- codecov
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov && travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"

0 comments on commit 6275063

Please sign in to comment.