Commit 7e25b20a authored by Wim Godden's avatar Wim Godden
Browse files

Revert "Remove references to Coveralls and create coverage reports based on ENV variable"

This reverts commit 215aeb38.
parent 215aeb38
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
service_name: travis-ci
......@@ -12,42 +12,42 @@ matrix:
env: PHPCS_VERSION="2.9"
- php: 5.3
env: PHPCS_VERSION=">=1.5.1,<2.0" REPORT_COVERAGE=1
env: PHPCS_VERSION=">=1.5.1,<2.0" COVERALLS_VERSION="~1.0"
- php: 5.3
env: PHPCS_VERSION=">=2.0,<3.0" REPORT_COVERAGE=1
env: PHPCS_VERSION=">=2.0,<3.0" COVERALLS_VERSION="~1.0"
- php: 5.4
env: PHPCS_VERSION=">=1.5.1,<2.0"
env: PHPCS_VERSION=">=1.5.1,<2.0" COVERALLS_VERSION="~1.0"
- php: 5.4
env: PHPCS_VERSION=">=2.0,<3.0"
env: PHPCS_VERSION=">=2.0,<3.0" COVERALLS_VERSION="~1.0"
- php: 5.5
env: PHPCS_VERSION=">=1.5.1,<2.0"
env: PHPCS_VERSION=">=1.5.1,<2.0" COVERALLS_VERSION="dev-master"
- php: 5.5
env: PHPCS_VERSION=">=2.0,<3.0"
env: PHPCS_VERSION=">=2.0,<3.0" COVERALLS_VERSION="dev-master"
- php: 5.5
env: PHPCS_VERSION="2.9.x-dev" REPORT_COVERAGE=1
env: PHPCS_VERSION="2.9.x-dev" COVERALLS_VERSION="dev-master"
- php: 5.6
env: PHPCS_VERSION=">=1.5.1,<2.0"
env: PHPCS_VERSION=">=1.5.1,<2.0" COVERALLS_VERSION="dev-master"
- php: 5.6
env: PHPCS_VERSION=">=2.0,<3.0"
env: PHPCS_VERSION=">=2.0,<3.0" COVERALLS_VERSION="dev-master"
- php: 5.6
env: PHPCS_VERSION="2.9.x-dev"
env: PHPCS_VERSION="2.9.x-dev" COVERALLS_VERSION="dev-master"
- php: 7.0
env: PHPCS_VERSION=">=1.5.1,<2.0"
env: PHPCS_VERSION=">=1.5.1,<2.0" COVERALLS_VERSION="dev-master"
- php: 7.0
env: PHPCS_VERSION=">=2.0,<3.0"
env: PHPCS_VERSION=">=2.0,<3.0" COVERALLS_VERSION="dev-master"
- php: 7.0
env: PHPCS_VERSION="2.9.x-dev" SNIFF=1
env: PHPCS_VERSION="2.9.x-dev" SNIFF=1 COVERALLS_VERSION="dev-master"
- php: 7.1
env: PHPCS_VERSION=">=1.5.1,<2.0" REPORT_COVERAGE=1
env: PHPCS_VERSION=">=1.5.1,<2.0" COVERALLS_VERSION="dev-master"
- php: 7.1
env: PHPCS_VERSION=">=2.0,<3.0" REPORT_COVERAGE=1
env: PHPCS_VERSION=">=2.0,<3.0" COVERALLS_VERSION="dev-master"
- php: 7.1
env: PHPCS_VERSION="2.9.x-dev" REPORT_COVERAGE=1
env: PHPCS_VERSION="2.9.x-dev" COVERALLS_VERSION="dev-master"
- php: nightly
env: PHPCS_VERSION=">=1.5.1,<2.0"
......@@ -64,6 +64,7 @@ before_install:
- export XMLLINT_INDENT=" "
# PHP 5.3+: set up test environment using Composer.
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then composer self-update; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" && $TRAVIS_PHP_VERSION != "nightly" ]]; then composer require --dev satooshi/php-coveralls:${COVERALLS_VERSION}; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then composer require squizlabs/php_codesniffer:${PHPCS_VERSION}; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then composer install; fi
# PHP 5.2: set up test environment using git cloning.
......@@ -73,7 +74,7 @@ before_install:
- if [[ $TRAVIS_PHP_VERSION < "5.3" ]]; then $PHPCS_BIN --config-set installed_paths "$(dirname "$(pwd)")"; fi
before_script:
- if [[ "$REPORT_COVERAGE" == "1" ]]; then mkdir -p build/logs; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" && $TRAVIS_PHP_VERSION != "nightly" ]]; then mkdir -p build/logs; fi
- phpenv rehash
script:
......@@ -84,7 +85,8 @@ script:
# Check the code style of the code base.
- if [[ "$SNIFF" == "1" ]]; then vendor/bin/phpcs . --standard=./phpcs.xml --runtime-set ignore_warnings_on_exit 1; fi
# Run the unit tests.
- if [[ "$REPORT_COVERAGE" == "1" ]]; then phpunit --configuration phpunit-travis.xml --coverage-clover build/logs/clover.xml; else phpunit --configuration phpunit.xml; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" && $TRAVIS_PHP_VERSION != "nightly" ]]; then phpunit --configuration phpunit-travis.xml --coverage-clover build/logs/clover.xml; fi
- if [[ $TRAVIS_PHP_VERSION == "5.2" || $TRAVIS_PHP_VERSION == "nightly" ]]; then phpunit --configuration phpunit.xml; fi
# Validate the xml file.
# @link http://xmlsoft.org/xmllint.html
- if [[ "$SNIFF" == "1" ]]; then xmllint --noout ./ruleset.xml; fi
......@@ -92,4 +94,4 @@ script:
- if [[ "$SNIFF" == "1" ]]; then diff -B ./ruleset.xml <(xmllint --format "./ruleset.xml"); fi
after_success:
- if [[ "$REPORT_COVERAGE" == "1" ]]; then wget https://scrutinizer-ci.com/ocular.phar ; php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" && $TRAVIS_PHP_VERSION != "nightly" ]]; then php vendor/bin/coveralls -v -x build/logs/clover.xml; wget https://scrutinizer-ci.com/ocular.phar ; php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
......@@ -6,6 +6,9 @@
"ext-tokenizer" : "*",
"squizlabs/php_codesniffer" : "~2.0"
},
"require-dev" : {
"satooshi/php-coveralls" : "dev-master"
},
"license" : "LGPL-3.0",
"keywords" : [ "compatibility", "phpcs", "standards" ],
"autoload" : {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment