Skip to content

Commit

Permalink
Run code coverage just once (concretecms#7259)
Browse files Browse the repository at this point in the history
* Run code coverage just once

* Set scrutinizer to only expect one run

* Update scrutinizer timeout to 20 minutes

Hopefully we can work to get this time down :/
  • Loading branch information
mlocati authored and KorvinSzanto committed Oct 30, 2018
1 parent 62a6e16 commit 8f87936
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ filter:

tools:
external_code_coverage:
timeout: 600
runs: 5
timeout: 1200
runs: 1
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- nightly

Expand All @@ -22,6 +21,9 @@ env:
matrix:
fast_finish: true
include:
- php: 7.1
env:
- DO_PHPUNIT=2
- php: 7.1
env:
- DO_CS_PHP=1
Expand All @@ -46,7 +48,8 @@ before_script:
script:
- if test $DO_CS_PHP -ne 0; then echo 'Testing PHP coding style'; composer phpcs; fi
- if test $DO_CS_JS -ne 0; then echo 'Testing JS coding style'; pushd build && grunt js:check && popd; fi
- if test $DO_PHPUNIT -ne 0; then echo 'Running tests'; composer test-coverage; fi
- if test $DO_PHPUNIT -eq 1; then echo 'Running tests'; composer test; fi
- if test $DO_PHPUNIT -gt 1; then echo 'Running tests (with coverage)'; composer test-coverage; fi
- if test $DO_BUILDASSETS -ne 0; then ./.travis/rebuild-assets.sh; fi

cache:
Expand All @@ -60,7 +63,7 @@ notifications:

after_script:
- |
if [ "$TRAVIS_PHP_VERSION" != 'nightly' ] && [ "$DO_PHPUNIT" -ne 0 ]; then
if test $DO_PHPUNIT -gt 1; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi
3 changes: 3 additions & 0 deletions .travis/composer-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ source "$( dirname "${BASH_SOURCE[0]}" )/travis_retry.sh"

echo 'Configuring PHP'
phpenv config-add "$( dirname "${BASH_SOURCE[0]}" )/php.ini"
if test $DO_PHPUNIT -lt 2; then
phpenv config-rm xdebug.ini || true
fi

echo 'Installing Composer packages - Magento''s composer merger'
travis_retry composer update --no-suggest --no-interaction $PREFER_LOWEST
Expand Down

0 comments on commit 8f87936

Please sign in to comment.