Modernize WordPress Playground testing infrastructure

- Update @wp-playground/cli to v3.0.22 (from deprecated v1.0.28)
- Add bin/playground-test.sh for AI assistant CLI testing
- Add bin/localwp-setup.sh for LocalWP integration
- Create .agents/local-testing-guide.md documentation
- Update blueprints to use new installPlugin step format
- Add npm scripts for playground:start/stop/status
- Add npm scripts for localwp:create/sync/reset
- Update GitHub Actions to use new CLI version
- Use PHP 8.0 and latest WordPress in blueprints
This commit is contained in:
2025-11-24 23:09:18 +00:00
parent 788bb6104f
commit 6e9fb5a9c4
8 changed files with 1117 additions and 40 deletions

View File

@@ -77,11 +77,9 @@ jobs:
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Add WordPress Playground CLI to dependencies
- name: Verify WordPress Playground CLI
run: |
echo "Installing WordPress Playground CLI..."
npm install --save-dev @wp-playground/cli @wp-playground/blueprints @wp-playground/client
echo "WordPress Playground CLI installed"
echo "WordPress Playground CLI version:"
npx @wp-playground/cli --version
- name: Create plugin zip
@@ -97,7 +95,7 @@ jobs:
ls -la playground/
cat playground/blueprint.json
# Start WordPress Playground with our blueprint
# Start WordPress Playground with our blueprint (using @wp-playground/cli 3.x syntax)
echo "Starting WordPress Playground server..."
npx @wp-playground/cli server --blueprint playground/blueprint.json --port 8888 --login &
SERVER_PID=$!
@@ -157,11 +155,9 @@ jobs:
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Add WordPress Playground CLI to dependencies
- name: Verify WordPress Playground CLI
run: |
echo "Installing WordPress Playground CLI..."
npm install --save-dev @wp-playground/cli @wp-playground/blueprints @wp-playground/client
echo "WordPress Playground CLI installed"
echo "WordPress Playground CLI version:"
npx @wp-playground/cli --version
- name: Create plugin zip
@@ -177,7 +173,7 @@ jobs:
ls -la playground/
cat playground/multisite-blueprint.json
# Start WordPress Playground with our blueprint
# Start WordPress Playground with our blueprint (using @wp-playground/cli 3.x syntax)
# Use a different port for multisite to avoid conflicts with single site tests
echo "Starting WordPress Playground server for multisite..."
npx @wp-playground/cli server --blueprint playground/multisite-blueprint.json --port 8889 --login &