diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index c00a1ca9322..00000000000 --- a/.coveralls.yml +++ /dev/null @@ -1,3 +0,0 @@ -src_dir: . -coverage_clover: ./tmp/clover.xml -json_path: ./tmp/coveralls-upload.json diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 543a40cf4ed..9e2c1c000a3 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -30,5 +30,24 @@ checks: tools: sensiolabs_security_checker: true - external_code_coverage: - timeout: 600 # Wait 10 minutes for Travis send coverage file. + +build: + environment: + php: '7.1' + mysql: true + apache2: + modules: ['rewrite'] + variables: + WP_VERSION: 'latest' + dependencies: + before: + - bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION + - curl -sS https://getcomposer.org/installer | php + - php composer.phar install + tests: + override: + - + command: 'vendor/bin/phpunit --coverage-clover=results' + coverage: + file: 'results' + format: 'clover' diff --git a/.travis.yml b/.travis.yml index bc49cf91d6e..3733acf8f38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_script: - bash tests/bin/travis.sh before script: - - bash tests/bin/phpunit.sh + - phpunit -c phpunit.xml.dist after_script: - bash tests/bin/travis.sh after diff --git a/tests/bin/phpunit.sh b/tests/bin/phpunit.sh deleted file mode 100755 index bb7a731ab40..00000000000 --- a/tests/bin/phpunit.sh +++ /dev/null @@ -1,5 +0,0 @@ -if [[ ${TRAVIS_BRANCH} == 'master' ]] && [[ ${TRAVIS_EVENT_TYPE} != 'pull_request' ]] && [[ ${TRAVIS_PHP_VERSION} == ${PHP_LATEST_STABLE} ]]; then - phpunit -c phpunit.xml.dist --coverage-clover ./tmp/clover.xml -else - phpunit -c phpunit.xml.dist -fi diff --git a/tests/bin/travis.sh b/tests/bin/travis.sh index b548987e982..b04b7973d34 100755 --- a/tests/bin/travis.sh +++ b/tests/bin/travis.sh @@ -15,13 +15,4 @@ if [ $1 == 'before' ]; then composer global require "phpunit/phpunit=6.2.*" fi -elif [ $1 == 'after' ]; then - - # Only run on master, not pull requests, latest stable PHP box (defined in .travis.yml). - if [[ ${TRAVIS_BRANCH} == 'master' ]] && [[ ${TRAVIS_EVENT_TYPE} != 'pull_request' ]] && [[ ${TRAVIS_PHP_VERSION} == ${PHP_LATEST_STABLE} ]]; then - wget https://scrutinizer-ci.com/ocular.phar - chmod +x ocular.phar - php ocular.phar code-coverage:upload --format=php-clover ./tmp/clover.xml - fi - fi