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

Dev: Only one WordPress #41057

Draft
wants to merge 30 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ea1e84a
Boost does not use Wordbless
kraftbj Jan 13, 2025
a48abac
Initial commit of a centralized test install of WordPress
kraftbj Jan 13, 2025
b50f8eb
Use new test package for a4a, classic-themes
kraftbj Jan 13, 2025
fb94186
Remove wordbless from Protect, doesn't run tests
kraftbj Jan 13, 2025
a94025a
Use new test package for social, starter plugins
kraftbj Jan 13, 2025
75c7241
Remove wordbless from VideoPress, wpcomsh plugins
kraftbj Jan 13, 2025
2f64811
Add test env package to various packages
kraftbj Jan 13, 2025
26b8b8c
Remove unused scripts/wordbless from boost-core, boost-speed-score, etc.
kraftbj Jan 13, 2025
188ec36
Add changelog files
kraftbj Jan 13, 2025
3f97749
Remove post-install script from already converted projects
kraftbj Jan 13, 2025
65f12a4
Add test env package to additional packages.
kraftbj Jan 13, 2025
347308a
Remove wordbless from import package
kraftbj Jan 13, 2025
7d629a8
Updating remaining packages
kraftbj Jan 13, 2025
6d5f63f
changelog
kraftbj Jan 13, 2025
4cb1858
Switch to a root approach
kraftbj Jan 13, 2025
3818c0e
Remove unused autoloader Composer instructions
kraftbj Jan 14, 2025
121e05c
Remove phpunit polyfill from js packages
kraftbj Jan 14, 2025
c455ea8
Try having wordbless not in the root to have a cleaner autoload include
kraftbj Jan 14, 2025
f509592
changelog
kraftbj Jan 14, 2025
5e14f65
Merge remote-tracking branch 'origin/trunk' into try/one-wordpress-to…
kraftbj Jan 14, 2025
af53f3d
Version mangling
kraftbj Jan 14, 2025
1561271
Install monorepo composer in GH tests
kraftbj Jan 14, 2025
d9f6f06
GH: only install the test env php
kraftbj Jan 14, 2025
d1a3fa1
Allow for non-symlink installs within the monorepo
kraftbj Jan 14, 2025
d109ddc
Restore brain/monkey to social
kraftbj Jan 14, 2025
51bf39c
Initial changes from code review
kraftbj Jan 14, 2025
ad73ac3
Re-add phan config and lock update
kraftbj Jan 14, 2025
e1bd7c3
Merge remote-tracking branch 'origin/trunk' into try/one-wordpress-to…
kraftbj Jan 15, 2025
576c27c
Rework composer install
kraftbj Jan 15, 2025
78be709
Connection: update test to look for dynamic WP location
kraftbj Jan 15, 2025
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
17 changes: 17 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@ jobs:
echo "::endgroup::"
fi

echo "::group::Composer"
if [[ "$WP_BRANCH" == 'trunk' || "$WP_BRANCH" == 'previous' ]]; then
VER=$(composer --format=json --working-dir="$DIR" show | jq -r '.installed[] | select( .name == "roots/wordpress" ) | .version')
if [[ -n "$VER" ]]; then
INSVER=$WORDPRESS_TAG
[[ "$WORDPRESS_TAG" == 'trunk' ]] && INSVER="dev-main as $VER"
echo "Supposed to run tests against WordPress $WORDPRESS_TAG, so setting roots/wordpress and roots/wordpress-no-content to \"$INSVER\""
# Composer seems to sometimes have issues with deleting the wordpress dir on its own, so do it manually first.
rm -rf "$DIR/wordpress"
composer --working-dir="$DIR" require --dev roots/wordpress="$INSVER" roots/wordpress-no-content="$INSVER"
fi
fi
composer install --working-dir=tools/php-test-env
echo "::endgroup::"



- name: Detect changed projects
id: changed
run: |
Expand Down
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
],
"test-js": [
"cd tools/cli && pnpm test"
],
"post-install-cmd": [
"cd tools/php-test-env && composer install"
],
"post-update-cmd": [
"cd tools/php-test-env && composer update"
]
},
"scripts-descriptions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/ai-client/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


1 change: 0 additions & 1 deletion projects/js-packages/analytics/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/base-styles/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"repositories": [
{
"type": "path",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/boost-score-api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"scripts": {
Expand All @@ -26,11 +25,6 @@
"pnpm run test"
]
},
"autoload": {
"classmap": [
"src/"
]
},
"repositories": [
{
"type": "path",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


5 changes: 0 additions & 5 deletions projects/js-packages/charts/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"require-dev": {
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


5 changes: 0 additions & 5 deletions projects/js-packages/config/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"require-dev": {
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"test-js": [
"pnpm run test"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


5 changes: 0 additions & 5 deletions projects/js-packages/critical-css-gen/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"require-dev": {
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/image-guide/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


1 change: 0 additions & 1 deletion projects/js-packages/licensing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/publicize-components/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"test-js": [
"pnpm run test"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/react-data-sync-client/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/scan/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


5 changes: 0 additions & 5 deletions projects/js-packages/script-data/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"require-dev": {
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {},
"repositories": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


1 change: 0 additions & 1 deletion projects/js-packages/shared-extension-utils/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/storybook/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": "NODE_ENV=development pnpm run storybook:build",
"build-production": "NODE_ENV=production pnpm run storybook:build"
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/svelte-data-sync-client/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"pnpm run build"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Only changing the dev environment, no package-specific code


6 changes: 0 additions & 6 deletions projects/js-packages/videopress-core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"build-development": [
"Composer\\Config::disableProcessTimeout",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Development env change, no change to any code of these projects


6 changes: 2 additions & 4 deletions projects/packages/admin-ui/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "@dev",
"automattic/jetpack-logo": "@dev",
"automattic/wordbless": "^0.4.2"
"automattic/jetpack-test-environment": "@dev"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
Expand All @@ -29,9 +29,7 @@
],
"test-php": [
"@composer phpunit"
],
"post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
"post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy"
]
},
"repositories": [
{
Expand Down
3 changes: 2 additions & 1 deletion projects/packages/admin-ui/tests/php/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@

define( 'WP_DEBUG', true );

\WorDBless\Load::load();
// Initialize WordPress test environment
\Automattic\Jetpack\Test_Environment::init();
Loading
Loading