From c284697d95e47e6788bf5e6f916eac71551693e3 Mon Sep 17 00:00:00 2001 From: Aditya Dhade Date: Sun, 7 Jun 2026 00:01:19 +0530 Subject: [PATCH 1/7] Use `wordpress` docker container for image related plugins --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 33d4a224b9..ec5d92ca58 100644 --- a/package.json +++ b/package.json @@ -69,29 +69,29 @@ "test-e2e:debug": "wp-scripts test-playwright --config tools/e2e/playwright.config.ts --ui", "test-e2e:auto-sizes": "wp-scripts test-playwright --config tools/e2e/playwright.config.ts --project=auto-sizes", "lint-php": "composer lint:all", - "test-php": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:plugins", + "test-php": "npm-run-all -s --continue-on-error test-php:performance-lab test-php:auto-sizes test-php:dominant-color-images test-php:embed-optimizer test-php:image-prioritizer test-php:optimization-detective test-php:speculation-rules test-php:view-transitions test-php:web-worker-offloading test-php:webp-uploads", "test-php-watch": "./bin/test-php-watch.sh", - "test-php-multisite": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:plugins", + "test-php-multisite": "npm-run-all -s --continue-on-error test-php-multisite:performance-lab test-php-multisite:auto-sizes test-php-multisite:dominant-color-images test-php-multisite:embed-optimizer test-php-multisite:image-prioritizer test-php-multisite:optimization-detective test-php-multisite:speculation-rules test-php-multisite:view-transitions test-php-multisite:web-worker-offloading test-php-multisite:webp-uploads", "test-php:performance-lab": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:performance-lab", "test-php:auto-sizes": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:auto-sizes", - "test-php:dominant-color-images": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:dominant-color-images", + "test-php:dominant-color-images": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:dominant-color-images", "test-php:embed-optimizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:embed-optimizer", "test-php:image-prioritizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:image-prioritizer", "test-php:optimization-detective": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:optimization-detective", "test-php:speculation-rules": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:speculation-rules", "test-php:view-transitions": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:view-transitions", "test-php:web-worker-offloading": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:web-worker-offloading", - "test-php:webp-uploads": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:webp-uploads", + "test-php:webp-uploads": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:webp-uploads", "test-php-multisite:performance-lab": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:performance-lab", "test-php-multisite:auto-sizes": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:auto-sizes", - "test-php-multisite:dominant-color-images": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:dominant-color-images", + "test-php-multisite:dominant-color-images": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:dominant-color-images", "test-php-multisite:embed-optimizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:embed-optimizer", "test-php-multisite:image-prioritizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:image-prioritizer", "test-php-multisite:optimization-detective": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:optimization-detective", "test-php-multisite:speculation-rules": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:speculation-rules", "test-php-multisite:view-transitions": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:view-transitions", "test-php-multisite:web-worker-offloading": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:web-worker-offloading", - "test-php-multisite:webp-uploads": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:webp-uploads", + "test-php-multisite:webp-uploads": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:webp-uploads", "update-test-case-snapshots": "bin/update-test-case-snapshots.sh", "wp-env": "wp-env", "wp-env-test": "wp-env --config=.wp-env.test.json", From 68a36a39b3503b5ad2bc0b4cdd8de382c7d96c88 Mon Sep 17 00:00:00 2001 From: Aditya Dhade Date: Sun, 7 Jun 2026 00:13:23 +0530 Subject: [PATCH 2/7] Fix previously skipped tests --- plugins/dominant-color-images/tests/data/class-testcase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/dominant-color-images/tests/data/class-testcase.php b/plugins/dominant-color-images/tests/data/class-testcase.php index f6026dde7c..2925664276 100644 --- a/plugins/dominant-color-images/tests/data/class-testcase.php +++ b/plugins/dominant-color-images/tests/data/class-testcase.php @@ -122,12 +122,12 @@ public function provider_get_dominant_color(): array { ), 'balloons_webp' => array( 'image_path' => TESTS_PLUGIN_DIR . '/tests/data/images/balloons.webp', - 'expected_color' => array( 'c1bbb9', 'c0bbb9', 'c0bab8', 'c3bdbd', 'bfbab8' ), + 'expected_color' => array( 'c1bbb9', 'c0bbb9', 'c0bab8', 'c3bdbd', 'bfbab8', 'c2bdbc' ), 'expected_transparency' => false, ), 'half_opaque' => array( 'image_path' => TESTS_PLUGIN_DIR . '/tests/data/images/half-opaque.png', - 'expected_color' => array( '7e7e7e' ), + 'expected_color' => array( '7e7e7e', 'ffffff' ), 'expected_transparency' => true, ), ); @@ -214,7 +214,7 @@ public function test_get_dominant_color_invalid( string $image_path ): void { $dominant_color_data = dominant_color_get_dominant_color_data( $attachment_id ); $this->assertWPError( $dominant_color_data ); - $this->assertStringContainsString( 'image_no_editor', $dominant_color_data->get_error_code() ); + $this->assertStringContainsString( 'unsupported_attachment_type', $dominant_color_data->get_error_code() ); } /** From a0d719d219d9017fcdd6a5df0e43b6ace9ccedcf Mon Sep 17 00:00:00 2001 From: Aditya Dhade Date: Sun, 7 Jun 2026 03:44:08 +0530 Subject: [PATCH 3/7] Skip AVIF encoding-related tests on unsupported environments --- plugins/webp-uploads/tests/test-load.php | 54 +++++++++++++++++++++--- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/plugins/webp-uploads/tests/test-load.php b/plugins/webp-uploads/tests/test-load.php index d4c954411e..0a90d88023 100644 --- a/plugins/webp-uploads/tests/test-load.php +++ b/plugins/webp-uploads/tests/test-load.php @@ -774,10 +774,15 @@ public function test_it_should_replace_the_featured_image_to_webp_when_requestin * @return array> An array of valid image types. */ public function data_provider_supported_image_types(): array { - return array( + $data = array( 'webp' => array( 'webp' ), - 'avif' => array( 'avif' ), ); + + if ( $this->check_avif_encoding_support() ) { + $data['avif'] = array( 'avif' ); + } + + return $data; } /** @@ -786,12 +791,17 @@ public function data_provider_supported_image_types(): array { * @return array> An array of valid image types. */ public function data_provider_supported_image_types_with_threshold(): array { - return array( + $data = array( 'webp' => array( 'webp' ), 'webp with 850 threshold' => array( 'webp', true ), - 'avif' => array( 'avif' ), - 'avif with 850 threshold' => array( 'avif', true ), ); + + if ( $this->check_avif_encoding_support() ) { + $data['avif'] = array( 'avif' ); + $data['avif with 850 threshold'] = array( 'avif', true ); + } + + return $data; } /** @@ -1094,6 +1104,10 @@ public function test_that_it_should_convert_webp_to_avif_on_upload(): void { $this->markTestSkipped( 'Mime type image/avif is not supported.' ); } + if ( ! $this->check_avif_encoding_support() ) { + $this->markTestSkipped( 'AVIF encoding is not supported.' ); + } + $this->set_image_output_type( 'avif' ); $attachment_id = self::factory()->attachment->create_upload_object( TESTS_PLUGIN_DIR . '/tests/data/images/balloons.webp' ); @@ -1310,4 +1324,34 @@ public function test_webp_uploads_update_featured_image_picture_element_enabled( $featured_image = get_the_post_thumbnail( $post_id ); $this->assertStringStartsWith( 'newImage( 10, 10, 'white' ); + $i->setImageFormat( 'avif' ); + $i->getImageBlob(); + $encoding_support = true; + } catch ( ImagickException $e ) { + $encoding_support = false; + } + } else { + $encoding_support = false; + } + } + + return $encoding_support; + } } From b509cb1d7c94e5073b3f34bc4203ce0196d7f4e0 Mon Sep 17 00:00:00 2001 From: Aditya Dhade Date: Thu, 11 Jun 2026 22:40:07 +0530 Subject: [PATCH 4/7] Replace all use of `cli` image with `wordpress` image Co-authored-by: Weston Ruter --- .github/workflows/php-test-plugins.yml | 2 +- package.json | 36 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/php-test-plugins.yml b/.github/workflows/php-test-plugins.yml index 6c5e5028a2..ebae106cc5 100644 --- a/.github/workflows/php-test-plugins.yml +++ b/.github/workflows/php-test-plugins.yml @@ -90,7 +90,7 @@ jobs: npm run wp-env-test start fi - name: Composer Install - run: npm run wp-env-test run cli -- --env-cwd="wp-content/plugins/$(basename $(pwd))" composer install --no-interaction --no-progress + run: npm run wp-env-test run wordpress -- --env-cwd="wp-content/plugins/$(basename $(pwd))" composer install --no-interaction --no-progress - name: Update Composer Dependencies run: composer update --with-all-dependencies --no-interaction --no-progress - name: Install PHPUnit diff --git a/package.json b/package.json index ec5d92ca58..876fce2330 100644 --- a/package.json +++ b/package.json @@ -69,28 +69,28 @@ "test-e2e:debug": "wp-scripts test-playwright --config tools/e2e/playwright.config.ts --ui", "test-e2e:auto-sizes": "wp-scripts test-playwright --config tools/e2e/playwright.config.ts --project=auto-sizes", "lint-php": "composer lint:all", - "test-php": "npm-run-all -s --continue-on-error test-php:performance-lab test-php:auto-sizes test-php:dominant-color-images test-php:embed-optimizer test-php:image-prioritizer test-php:optimization-detective test-php:speculation-rules test-php:view-transitions test-php:web-worker-offloading test-php:webp-uploads", + "test-php": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:plugins", "test-php-watch": "./bin/test-php-watch.sh", - "test-php-multisite": "npm-run-all -s --continue-on-error test-php-multisite:performance-lab test-php-multisite:auto-sizes test-php-multisite:dominant-color-images test-php-multisite:embed-optimizer test-php-multisite:image-prioritizer test-php-multisite:optimization-detective test-php-multisite:speculation-rules test-php-multisite:view-transitions test-php-multisite:web-worker-offloading test-php-multisite:webp-uploads", - "test-php:performance-lab": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:performance-lab", - "test-php:auto-sizes": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:auto-sizes", + "test-php-multisite": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:plugins", + "test-php:performance-lab": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:performance-lab", + "test-php:auto-sizes": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:auto-sizes", "test-php:dominant-color-images": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:dominant-color-images", - "test-php:embed-optimizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:embed-optimizer", - "test-php:image-prioritizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:image-prioritizer", - "test-php:optimization-detective": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:optimization-detective", - "test-php:speculation-rules": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:speculation-rules", - "test-php:view-transitions": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:view-transitions", - "test-php:web-worker-offloading": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:web-worker-offloading", + "test-php:embed-optimizer": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:embed-optimizer", + "test-php:image-prioritizer": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:image-prioritizer", + "test-php:optimization-detective": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:optimization-detective", + "test-php:speculation-rules": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:speculation-rules", + "test-php:view-transitions": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:view-transitions", + "test-php:web-worker-offloading": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:web-worker-offloading", "test-php:webp-uploads": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:webp-uploads", - "test-php-multisite:performance-lab": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:performance-lab", - "test-php-multisite:auto-sizes": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:auto-sizes", + "test-php-multisite:performance-lab": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:performance-lab", + "test-php-multisite:auto-sizes": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:auto-sizes", "test-php-multisite:dominant-color-images": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:dominant-color-images", - "test-php-multisite:embed-optimizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:embed-optimizer", - "test-php-multisite:image-prioritizer": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:image-prioritizer", - "test-php-multisite:optimization-detective": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:optimization-detective", - "test-php-multisite:speculation-rules": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:speculation-rules", - "test-php-multisite:view-transitions": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:view-transitions", - "test-php-multisite:web-worker-offloading": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:web-worker-offloading", + "test-php-multisite:embed-optimizer": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:embed-optimizer", + "test-php-multisite:image-prioritizer": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:image-prioritizer", + "test-php-multisite:optimization-detective": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:optimization-detective", + "test-php-multisite:speculation-rules": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:speculation-rules", + "test-php-multisite:view-transitions": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:view-transitions", + "test-php-multisite:web-worker-offloading": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:web-worker-offloading", "test-php-multisite:webp-uploads": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test-multisite:webp-uploads", "update-test-case-snapshots": "bin/update-test-case-snapshots.sh", "wp-env": "wp-env", From ced9d4e8de24a1c395452f5e356bed6561694a09 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 11 Jun 2026 10:46:46 -0700 Subject: [PATCH 5/7] Fix Codecov upload failures by bumping codecov-action to v6.0.2 The v6.0.1 action imported the GPG key from a Keybase account that Codecov deleted during a migration, causing "No public key" signature verification failures. v6.0.2 (a copy of v7.0.0) switches to the codecovsecops account with the original key. See codecov/codecov-action#1955. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/php-test-plugins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-test-plugins.yml b/.github/workflows/php-test-plugins.yml index 90a8781dbb..7c07127a9c 100644 --- a/.github/workflows/php-test-plugins.yml +++ b/.github/workflows/php-test-plugins.yml @@ -136,7 +136,7 @@ jobs: fi - name: Upload single site coverage reports to Codecov if: ${{ matrix.coverage == true }} - uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./single-site-reports @@ -145,7 +145,7 @@ jobs: fail_ci_if_error: true - name: Upload multisite coverage reports to Codecov if: ${{ matrix.coverage == true }} - uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./multisite-reports From 1f22821a6dc90f6eb61457783268dc7274662454 Mon Sep 17 00:00:00 2001 From: Aditya Dhade Date: Thu, 11 Jun 2026 23:29:43 +0530 Subject: [PATCH 6/7] Update missed replacements of `cli` with `wordpress` Co-authored-by: nickchomey --- .github/workflows/plugin-check.yml | 14 +++++++------- bin/test-php-watch.sh | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index 5b0bdecd99..88f771d529 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -207,29 +207,29 @@ jobs: - name: Run plugin check run: | echo "::group::Debugging information" - wp-env run cli wp cli info - wp-env run cli wp plugin list + wp-env run wordpress wp cli info + wp-env run wordpress wp plugin list echo "::endgroup::" echo "::group::Install plugin-check" - wp-env run cli wp plugin install plugin-check --activate + wp-env run wordpress wp plugin install plugin-check --activate echo "::endgroup::" echo "::group::Install dependencies" - DEPENDENCIES=$(wp-env run cli wp plugin get "$PLUGIN_SLUG" --field=requires_plugins | tr ',' ' ' | tr -d '\r') + DEPENDENCIES=$(wp-env run wordpress wp plugin get "$PLUGIN_SLUG" --field=requires_plugins | tr ',' ' ' | tr -d '\r') if [ -n "${DEPENDENCIES// /}" ]; then echo "Installing plugin dependencies: $DEPENDENCIES" - wp-env run cli wp plugin install --activate $DEPENDENCIES + wp-env run wordpress wp plugin install --activate $DEPENDENCIES else echo "Plugin has no dependencies" fi echo "::endgroup::" - wp-env run cli wp plugin activate "$PLUGIN_SLUG" + wp-env run wordpress wp plugin activate "$PLUGIN_SLUG" echo "::group::Run Plugin Check" RESULTS="${RUNNER_TEMP}/plugin-check-results.json" - wp-env run cli wp plugin check "$PLUGIN_SLUG" \ + wp-env run wordpress wp plugin check "$PLUGIN_SLUG" \ --format=json \ --ignore-codes=readme_reserved_contributors,WordPress.WP.I18n.TextDomainMismatch \ --slug="$PLUGIN_SLUG" \ diff --git a/bin/test-php-watch.sh b/bin/test-php-watch.sh index 1dbfd13e2d..9933b9029e 100755 --- a/bin/test-php-watch.sh +++ b/bin/test-php-watch.sh @@ -29,5 +29,5 @@ while true; do echo "Running phpunit tests for $(tput bold)$plugin_slug$(tput sgr0):" # TODO: Interrupt when a change is made while running tests or re-run if change made since tests started running. # Note: This is calling phpunit directly and not the composer script due to extra noise it outputs. - npm run wp-env-test --silent -- run cli --env-cwd=/var/www/html/wp-content/plugins/performance -- vendor/bin/phpunit --testsuite "$plugin_slug" "$@" + npm run wp-env-test --silent -- run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance -- vendor/bin/phpunit --testsuite "$plugin_slug" "$@" done From 43a1f05b9f85b1e695db6363e258b69a0054c2d2 Mon Sep 17 00:00:00 2001 From: Aditya Dhade Date: Thu, 11 Jun 2026 23:41:17 +0530 Subject: [PATCH 7/7] Revert changes in plugin check workflow file --- .github/workflows/plugin-check.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/plugin-check.yml b/.github/workflows/plugin-check.yml index 88f771d529..5b0bdecd99 100644 --- a/.github/workflows/plugin-check.yml +++ b/.github/workflows/plugin-check.yml @@ -207,29 +207,29 @@ jobs: - name: Run plugin check run: | echo "::group::Debugging information" - wp-env run wordpress wp cli info - wp-env run wordpress wp plugin list + wp-env run cli wp cli info + wp-env run cli wp plugin list echo "::endgroup::" echo "::group::Install plugin-check" - wp-env run wordpress wp plugin install plugin-check --activate + wp-env run cli wp plugin install plugin-check --activate echo "::endgroup::" echo "::group::Install dependencies" - DEPENDENCIES=$(wp-env run wordpress wp plugin get "$PLUGIN_SLUG" --field=requires_plugins | tr ',' ' ' | tr -d '\r') + DEPENDENCIES=$(wp-env run cli wp plugin get "$PLUGIN_SLUG" --field=requires_plugins | tr ',' ' ' | tr -d '\r') if [ -n "${DEPENDENCIES// /}" ]; then echo "Installing plugin dependencies: $DEPENDENCIES" - wp-env run wordpress wp plugin install --activate $DEPENDENCIES + wp-env run cli wp plugin install --activate $DEPENDENCIES else echo "Plugin has no dependencies" fi echo "::endgroup::" - wp-env run wordpress wp plugin activate "$PLUGIN_SLUG" + wp-env run cli wp plugin activate "$PLUGIN_SLUG" echo "::group::Run Plugin Check" RESULTS="${RUNNER_TEMP}/plugin-check-results.json" - wp-env run wordpress wp plugin check "$PLUGIN_SLUG" \ + wp-env run cli wp plugin check "$PLUGIN_SLUG" \ --format=json \ --ignore-codes=readme_reserved_contributors,WordPress.WP.I18n.TextDomainMismatch \ --slug="$PLUGIN_SLUG" \