File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,29 +19,28 @@ jobs:
1919
2020 - name : Start environment
2121 run : |
22- docker compose up -d
23- sleep 30 # Wait for services to start
22+ # GitHub Actions has MySQL on 3306 — use 3307 in CI
23+ echo "MYSQL_PORT=3307" >> .env
24+ docker compose up -d --wait
25+ docker compose ps
2426
2527 - name : Check service status
2628 run : |
27- docker compose ps
2829 curl -f http://localhost:8082/ || echo "WordPress not ready"
29-
30- - name : Install plugins
30+
31+ - name : Install and setup WordPress
3132 run : |
32- chmod +x install-plugins .sh
33- ./install-plugins .sh
33+ chmod +x scripts/setup .sh
34+ ./scripts/setup .sh --skip-docker-start
3435
3536 - name : Run WordPress health check
3637 run : |
3738 chmod +x tests/test-wordpress-health.sh
38- ./tests/test-wordpress-health.sh || echo "Health check failed, continuing..."
39-
40- - name : Run example plugin API test (demonstration)
39+ ./tests/test-wordpress-health.sh
40+
41+ - name : Verify REST API
4142 run : |
42- # This demonstrates the test framework without requiring a specific plugin
43- echo "Running demonstration test..."
44- curl -f http://localhost:8082/wp-json/ || echo "WordPress REST API not accessible"
43+ curl -fsS http://localhost:8082/wp-json/
4544
4645 - name : Stop environment
4746 if : always()
Original file line number Diff line number Diff line change 1- version : ' 3.8'
2-
31# ────────────────────────────────────────────────────────────────────────────
42# WordPress Testing Environment
53# ────────────────────────────────────────────────────────────────────────────
Original file line number Diff line number Diff line change 55# Usage:
66# ./scripts/setup.sh # Full setup (Docker + WP + plugins)
77# ./scripts/setup.sh --skip-plugins # Skip plugin installation
8- # ./scripts/setup.sh --fresh # Destroy volumes and start fresh
8+ # ./scripts/setup.sh --fresh # Destroy volumes and start fresh
9+ # ./scripts/setup.sh --skip-docker-start # Skip Docker start (containers already running)
910#
1011# Requirements: Docker with Compose v2 plugin
1112# =============================================================================
@@ -19,14 +20,16 @@ ENV_FILE="${ROOT_DIR}/.env"
1920COMPOSE_CMD=" docker compose"
2021SKIP_PLUGINS=false
2122FRESH_START=false
23+ SKIP_DOCKER_START=false
2224
2325# ── Args ────────────────────────────────────────────────────────────────────
2426for arg in " $@ " ; do
2527 case $arg in
26- --skip-plugins) SKIP_PLUGINS=true ;;
27- --fresh) FRESH_START=true ;;
28+ --skip-plugins) SKIP_PLUGINS=true ;;
29+ --fresh) FRESH_START=true ;;
30+ --skip-docker-start) SKIP_DOCKER_START=true ;;
2831 -h|--help)
29- echo " Usage: $0 [--skip-plugins] [--fresh]"
32+ echo " Usage: $0 [--skip-plugins] [--fresh] [--skip-docker-start] "
3033 exit 0
3134 ;;
3235 esac
@@ -281,7 +284,11 @@ show_summary() {
281284main () {
282285 check_prereqs
283286 load_env
284- start_containers
287+ if $SKIP_DOCKER_START ; then
288+ info " Skipping Docker start (--skip-docker-start)"
289+ else
290+ start_containers
291+ fi
285292 install_wordpress
286293 install_plugins
287294 install_bundles
You can’t perform that action at this time.
0 commit comments