This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Add Codecov support (alternative to Coveralls) #153
Comments
Some relevant lines about the current implementation for Coveralls:
What Codecov needs is the cover.xml file and the push to codecov.io. For GlotPress I've implemented this via https://github.com/GlotPress/GlotPress-WP/blob/develop/.travis.yml#L39-L43 and https://github.com/GlotPress/GlotPress-WP/blob/develop/phpunit.xml.dist#L28-L30. It looks like check-diff.sh: # Flag
COVERAGE_SERVICE=${COVERAGE_SERVICE:-coveralls}
function can_generate_coverage_clover {
if [ "$COVERAGE_SERVICE" == 'coveralls' ] && [ -e .coveralls.yml ] && [ -e composer.json ] && ! grep -sqi 'coverage' <<< "$DEV_LIB_SKIP"; then
if min_php_version "5.5.0" && cat composer.json | grep -Eq '"satooshi/php-coveralls"\s*:\s*"dev-master"'; then
return 0
elif min_php_version "5.3.0" && cat composer.json | grep -Eq '"satooshi/php-coveralls"\s*:\s*"~1.0"'; then
return 0
fi
elif [ "$COVERAGE_SERVICE" == 'codecov' ] ; then
return 1
fi
return 0
} travis.after_script.sh: if can_generate_coverage_clover && [ -s "$TEMP_DIRECTORY/paths-scope-php" ] && [ -n "$PHPUNIT_COVERAGE_DIR" ]; then
if [ "$COVERAGE_SERVICE" == 'coveralls' ]; then
cd "$PHPUNIT_COVERAGE_DIR"
php vendor/bin/coveralls -vvv
cd - > /dev/null
elif [ "$COVERAGE_SERVICE" == 'codecov' ] ; then
bash <(curl -s https://codecov.io/bash) -f "$PHPUNIT_COVERAGE_DIR/build/logs/clover.xml"
fi
fi |
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
See #152 (comment) from @ocean90:
The text was updated successfully, but these errors were encountered: