File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 7777 dependency-versions : highest
7878 composer-options : " --prefer-dist --no-suggest --no-progress"
7979
80+ - name : Prepare Database
81+ run : |
82+ # Drop the database if it exists to avoid creation error
83+ mysql -u root --password=root --host=127.0.0.1 --port=3306 -e "DROP DATABASE IF EXISTS wordpress_test;"
84+
8085 - name : Setup WP Tests
8186 run : |
8287 bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-version }}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212- Enabled automatic PR creation for WordPress compatibility updates with "automated" and "documentation" labels
1313- Added PHPUnit test framework with GitHub Actions workflow for automated testing
1414- Configured cross-version PHP testing (7.4-8.2) with multisite support
15+ - Fixed database creation issues in testing workflow for CI environment
1516
1617## [ 1.5.4] - 2025-05-04
1718### Changed
Original file line number Diff line number Diff line change @@ -108,7 +108,6 @@ install_test_suite() {
108108}
109109
110110install_db () {
111-
112111 if [ ${SKIP_DB_CREATE} = " true" ]; then
113112 return 0
114113 fi
@@ -129,6 +128,9 @@ install_db() {
129128 fi
130129 fi
131130
131+ # Drop database if it exists
132+ mysql --user=" $DB_USER " --password=" $DB_PASS " $EXTRA -e " DROP DATABASE IF EXISTS $DB_NAME "
133+
132134 # create database
133135 mysqladmin create $DB_NAME --user=" $DB_USER " --password=" $DB_PASS " $EXTRA
134136}
You can’t perform that action at this time.
0 commit comments