From e521a1544fec7962a5efc10c3250ef803d20da66 Mon Sep 17 00:00:00 2001 From: maso Date: Tue, 14 Nov 2017 00:26:49 +0330 Subject: [PATCH] Update projcet build script --- .coveralls.yml | 3 +++ .travis.yml | 28 +++++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..ac3f05c --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,3 @@ +service_name: travis-ci +coverage_clover: tests/clover.xml +json_path: tests/coveralls-upload.json \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index a815eb5..5890d7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,13 @@ language: php php: - '5.6' + - '7.1' + +services: + - mysql + +git: + depth: 1 mysql: database: test @@ -9,16 +16,23 @@ mysql: before_install: - sudo apt-get update > /dev/null - - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - - php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" - - php composer-setup.php - - php -r "unlink('composer-setup.php');" - + - mysql -e 'CREATE DATABASE IF NOT EXISTS test;' + install: - - php composer.phar install + # Install composer packages, will also trigger dump-autoload + - travis_retry composer install --no-interaction + # Install coveralls.phar + - wget -c -nc --retry-connrefused --tries=0 https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar + - chmod +x coveralls.phar + - php coveralls.phar --version script: - cd tests - php run.php - - php coverage-checker.php clover.xml 70 + - cd .. +after_success: +# Submit coverage report to Coveralls servers, see .coveralls.yml + - travis_retry php coveralls.phar -v +# Submit coverage report to codecov.io + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file