Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Coveralls reporting #364

Open
kasparsd opened this issue Jun 16, 2020 · 2 comments
Open

Fix Coveralls reporting #364

kasparsd opened this issue Jun 16, 2020 · 2 comments

Comments

@kasparsd
Copy link
Collaborator

Currently the following error is generated when trying to upload the coverage report to Coveralls during the Travis run:

https://travis-ci.com/github/WordPress/two-factor/jobs/349903189

$ source "$DEV_LIB_PATH/travis.after_script.sh"
if can_generate_coverage_clover && [ -s "$TEMP_DIRECTORY/paths-scope-php" ] && [ -n "$INITIAL_DIR" ]; then
	cd "$INITIAL_DIR"
	# Coveralls 1.x.x path
	COVERALLS_BIN="vendor/bin/coveralls";
	# Coveralls 2.x.x path
	if [ ! -e "$COVERALLS_BIN" ]; then
		COVERALLS_BIN="vendor/bin/php-coveralls"
	fi
	php $COVERALLS_BIN -v
	cd - > /dev/null
fi
In Configurator.php line 165:
                                                                                 
  [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]  
  coverage_clover XML file is not readable                                       
                                                                                 
Exception trace:
  at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php:165
 Satooshi\Bundle\CoverallsV1Bundle\Config\Configurator->getGlobPaths() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php:191
 Satooshi\Bundle\CoverallsV1Bundle\Config\Configurator->getGlobPathsFromStringOption() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php:141
 Satooshi\Bundle\CoverallsV1Bundle\Config\Configurator->ensureCloverXmlPaths() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php:119
 Satooshi\Bundle\CoverallsV1Bundle\Config\Configurator->createConfiguration() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Config/Configurator.php:36
 Satooshi\Bundle\CoverallsV1Bundle\Config\Configurator->load() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommand.php:149
 Satooshi\Bundle\CoverallsV1Bundle\Command\CoverallsV1JobsCommand->loadConfiguration() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/src/Satooshi/Bundle/CoverallsV1Bundle/Command/CoverallsV1JobsCommand.php:118
 Satooshi\Bundle\CoverallsV1Bundle\Command\CoverallsV1JobsCommand->execute() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/symfony/console/Application.php:987
 Symfony\Component\Console\Application->doRunCommand() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/symfony/console/Application.php:255
 Symfony\Component\Console\Application->doRun() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /tmp/wordpress/src/wp-content/plugins/two-factor/vendor/php-coveralls/php-coveralls/bin/coveralls:22
coveralls:v1:jobs [-c|--config [CONFIG]] [--dry-run] [--exclude-no-stmt] [-e|--env [ENV]] [-x|--coverage_clover COVERAGE_CLOVER] [-o|--json_path JSON_PATH] [-r|--root_dir [ROOT_DIR]]
@kasparsd
Copy link
Collaborator Author

I attempted to enable coverage reporting but it turns out that the wp-env doesn't support Xdebug outside of the wordpress container, so phpunit, cli and other containers don't get Xdebug support when enabled via the flag. This is reported here WordPress/gutenberg#42286

I've opened WordPress/wpdev-docker-images#89 to potentially address this for all images automatically.

@jeffpaul
Copy link
Member

jeffpaul commented Dec 3, 2024

@kasparsd looks like WordPress/wpdev-docker-images#89 is resolved, so does that make things more actionable here / do we want to still take action here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants