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

Build: Remove lazy-images ES5 validation #17561

Merged
merged 2 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docker/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ if [ ! -f /tmp/wordpress-develop/wp-tests-config.php ]; then
cp /tmp/wp-tests-config.php /tmp/wordpress-develop/wp-tests-config.php
fi

# Symlink jetpack into wordpress-develop for WP >= 5.6-beta1
if [ ! -e /tmp/wordpress-develop/tests/phpunit/data/plugins/jetpack ]; then
ln -s /var/www/html/wp-content/plugins/jetpack /tmp/wordpress-develop/tests/phpunit/data/plugins/jetpack
fi

# Add a PsySH dependency to wp-cli
echo 'require: /usr/local/bin/psysh' >> /var/www/html/wp-cli.yml

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"build-production-php": "COMPOSER_MIRROR_PATH_REPOS=1 composer install -o --no-dev --classmap-authoritative --prefer-dist",
"build-production-client": "NODE_ENV=production BABEL_ENV=production yarn build-client && yarn validate-es5 -- ./_inc/build/",
"build-production-extensions": "NODE_ENV=production BABEL_ENV=production yarn build-extensions",
"build-production-packages": "NODE_ENV=production BABEL_ENV=production yarn build-packages && yarn validate-es5 -- ./packages/lazy-images/",
"build-production-packages": "NODE_ENV=production BABEL_ENV=production yarn build-packages",
"build-production-search": "NODE_ENV=production BABEL_ENV=production yarn build-search && yarn validate-es5 -- ./_inc/build/instant-search/",
"build-production": "yarn distclean && yarn install --production=false && yarn build-production-client && yarn build-production-php && yarn build-production-extensions && yarn build-production-search && yarn build-production-packages",
"build-production-concurrently": "yarn distclean && yarn install --production=false && yarn concurrently 'yarn build-production-client' 'yarn build-production-php' 'NODE_ENV=production yarn build-extensions' 'NODE_ENV=production yarn build-search' 'NODE_ENV=production yarn build-packages'",
Expand Down
4 changes: 2 additions & 2 deletions tests/php/sync/test_class.jetpack-sync-callables.php
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,10 @@ function test_plugin_action_links_get_synced() {
// Nothing should have changed since we cache the results.
$this->assertEquals( $this->extract_plugins_we_are_testing( $plugins_action_links ), $expected_array );

if ( file_exists( WP_CONTENT_DIR . '/plugins/hello.php' ) ) {
if ( file_exists( WP_PLUGIN_DIR . '/hello.php' ) ) {
activate_plugin('hello.php', '', false, true );
}
if ( file_exists( WP_CONTENT_DIR . '/plugins/hello-dolly/hello.php' ) ) {
if ( file_exists( WP_PLUGIN_DIR . '/hello-dolly/hello.php' ) ) {
activate_plugin('hello-dolly/hello.php', '', false, true );
}

Expand Down
4 changes: 2 additions & 2 deletions tests/php/sync/test_class.jetpack-sync-plugins-updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function set_update_plugin_transient( $transient ) {
return (object) array(
'response' => array(
'the/the.php' => (object) array(
'package' => ABSPATH . WP_Test_Jetpack_Sync_Plugins::PLUGIN_ZIP
'package' => WP_Test_Jetpack_Sync_Plugins::PLUGIN_ZIP,
)
)
);
Expand All @@ -155,7 +155,7 @@ function set_update_plugin_transient_with_error( $transient ) {
return (object) array(
'response' => array(
'the/the.php' => (object) array(
'package' => ABSPATH . WP_Test_Jetpack_Sync_Plugins::PLUGIN_ZIP . '-doesnotexitst.zip'
'package' => WP_Test_Jetpack_Sync_Plugins::PLUGIN_ZIP . '-doesnotexitst.zip',
)
)
);
Expand Down
8 changes: 4 additions & 4 deletions tests/php/sync/test_class.jetpack-sync-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
class WP_Test_Jetpack_Sync_Plugins extends WP_Test_Jetpack_Sync_Base {
protected $theme;
const PLUGIN_ZIP = 'wp-content/plugins/jetpack/tests/php/files/the.1.1.zip';
const PLUGIN_ZIP = __DIR__ . '/../files/the.1.1.zip';

public function setUp() {
parent::setUp();
Expand Down Expand Up @@ -202,21 +202,21 @@ static function install_the_plugin() {
new Automatic_Upgrader_Skin( $plugin_defaults )
);
// 'https://downloads.wordpress.org/plugin/the.1.1.zip' Install it from local disk
$upgrader->install( ABSPATH . self::PLUGIN_ZIP );
$upgrader->install( self::PLUGIN_ZIP );
}

function set_update_plugin_transient( $transient ) {
return (object) array(
'response' => array(
'the/the.php' => (object) array(
'package' => ABSPATH . self::PLUGIN_ZIP
'package' => self::PLUGIN_ZIP,
)
)
);
}

static function remove_plugin() {
if ( file_exists( ABSPATH . 'wp-content/plugins/the/the.php' ) ) {
if ( file_exists( WP_PLUGIN_DIR . '/the/the.php' ) ) {
delete_plugins( array( 'the/the.php' ) );
wp_cache_delete( 'plugins', 'plugins' );
}
Expand Down
2 changes: 2 additions & 0 deletions tests/setup-travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ fi

cd ..
cp -r $PLUGIN_SLUG "/tmp/wordpress-$WP_BRANCH/src/wp-content/plugins/$PLUGIN_SLUG"
# Plugin dir for tests in WP >= 5.6-beta1
ln -s "/tmp/wordpress-$WP_BRANCH/src/wp-content/plugins/$PLUGIN_SLUG" "/tmp/wordpress-$WP_BRANCH/tests/phpunit/data/plugins/$PLUGIN_SLUG"
cd /tmp/wordpress-$WP_BRANCH

cp wp-tests-config-sample.php wp-tests-config.php
Expand Down