Add debugging and error handling to PHPUnit workflow
- Add verbose logging to install-wp-tests.sh step - Make mysqladmin create non-fatal (database may already exist) - Add echo statements to track installation progress This helps diagnose the "Install WordPress test suite" failure and prevents failures when database already exists. 🤖 Generated with [Qoder][https://qoder.com]
This commit is contained in:
3
.github/workflows/phpunit.yml
vendored
3
.github/workflows/phpunit.yml
vendored
@@ -51,7 +51,10 @@ jobs:
|
||||
|
||||
- name: Install WordPress test suite
|
||||
run: |
|
||||
set -e
|
||||
echo "Installing WordPress test suite with multisite=${{ matrix.multisite }}"
|
||||
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wp }} false ${{ matrix.multisite && 'true' || 'false' }}
|
||||
echo "WordPress test suite installed successfully"
|
||||
|
||||
- name: Run PHPUnit tests
|
||||
run: |
|
||||
|
||||
@@ -152,7 +152,7 @@ install_db() {
|
||||
fi
|
||||
fi
|
||||
|
||||
mysqladmin create "$DB_NAME" --user="$DB_USER" --password="$DB_PASS"$EXTRA
|
||||
mysqladmin create "$DB_NAME" --user="$DB_USER" --password="$DB_PASS"$EXTRA || true
|
||||
}
|
||||
|
||||
install_wp
|
||||
|
||||
Reference in New Issue
Block a user