Commit 7e10460fdc for woocommerce
commit 7e10460fdc375cba52a35d82609b5d934568fe82
Author: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
Date: Mon Dec 8 18:14:55 2025 +0200
dev: remove wp-env mysql port configuration (#62316)
* Remove explicit wp-env mysql ports configuration
* Remove explicit wp-env port configurations and diagnostics in CI workflow
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d8592b0f06..700d1eccd2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -187,53 +187,10 @@ jobs:
id: 'prepare-test-environment'
if: ${{ matrix.testEnv.shouldCreate }}
run: |
- # Explicitly set all wp-env ports
- echo "WP_ENV_PORT=8888" >> "$GITHUB_ENV"
- echo "WP_ENV_MYSQL_PORT=58888" >> "$GITHUB_ENV"
- echo "WP_ENV_TESTS_PORT=8086" >> "$GITHUB_ENV"
- echo "WP_ENV_TESTS_MYSQL_PORT=58086" >> "$GITHUB_ENV"
# WP_BASE_URL is set to satisfy blocks E2Es setup (setupRest)
echo "WP_BASE_URL=http://localhost:8086" >> "$GITHUB_ENV"
- # Export for current step
- export WP_ENV_PORT=8888
- export WP_ENV_MYSQL_PORT=58888
- export WP_ENV_TESTS_PORT=8086
- export WP_ENV_TESTS_MYSQL_PORT=58086
-
- # Debug: Show current state before starting wp-env
- echo "::group::Pre-start diagnostics"
- echo "=== wp-env ports ==="
- echo "WP_ENV_PORT=$WP_ENV_PORT"
- echo "WP_ENV_MYSQL_PORT=$WP_ENV_MYSQL_PORT"
- echo "WP_ENV_TESTS_PORT=$WP_ENV_TESTS_PORT"
- echo "WP_ENV_TESTS_MYSQL_PORT=$WP_ENV_TESTS_MYSQL_PORT"
- echo "=== Docker containers ==="
- docker ps -a || true
- echo "=== Docker networks ==="
- docker network ls || true
- echo "=== Ports in use ==="
- ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
- echo "::endgroup::"
-
- # Try to start wp-env, capture output for diagnostics on failure
- if ! pnpm --filter="${{ matrix.projectName }}" ${{ matrix.testEnv.start }}; then
- echo "::error::wp-env start failed"
- echo "::group::Post-failure diagnostics"
- echo "=== Docker containers after failure ==="
- docker ps -a || true
- echo "=== Docker logs from mysql containers ==="
- docker ps -a --filter "name=mysql" --format "{{.Names}}" | xargs -I {} docker logs {} 2>&1 | tail -50 || true
- echo "=== Ports in use after failure ==="
- ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null || true
- echo "=== Processes using common wp-env ports ==="
- for port in $WP_ENV_PORT $WP_ENV_MYSQL_PORT $WP_ENV_TESTS_PORT $WP_ENV_TESTS_MYSQL_PORT 3306; do
- echo "--- Port $port ---"
- lsof -i :$port 2>/dev/null || ss -tlnp "sport = :$port" 2>/dev/null || true
- done
- echo "::endgroup::"
- exit 1
- fi
+ pnpm --filter="${{ matrix.projectName }}" ${{ matrix.testEnv.start }}
- name: 'Determine BuildKite Analytics Message'
env:
diff --git a/plugins/woocommerce/.wp-env.json b/plugins/woocommerce/.wp-env.json
index 692300b148..6c858cc72a 100644
--- a/plugins/woocommerce/.wp-env.json
+++ b/plugins/woocommerce/.wp-env.json
@@ -13,12 +13,8 @@
"afterClean": "./tests/e2e-pw/bin/test-env-setup.sh"
},
"env": {
- "development": {
- "mysqlPort": 58888
- },
"tests": {
"port": 8086,
- "mysqlPort": 58086,
"plugins": [
".",
"https://downloads.wordpress.org/plugin/akismet.zip",