diff --git a/.github/performance-blueprint.json b/.github/performance-blueprint.json new file mode 100644 index 000000000..4d8c53e08 --- /dev/null +++ b/.github/performance-blueprint.json @@ -0,0 +1,7 @@ +{ + "steps": [ + { + "step": "enableMultisite" + } + ] +} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ebd699f6f..1f93172b1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,9 @@ jobs: php-tests: name: PHP ${{ matrix.php-version }} runs-on: ubuntu-latest + continue-on-error: ${{ matrix.php-version == '8.5' }} strategy: + fail-fast: false matrix: php-version: ["8.2", "8.3", "8.4", "8.5"] services: @@ -116,9 +118,11 @@ jobs: with: plugins: | ./ + blueprint: .github/performance-blueprint.json + wp-version: "6.8" urls: | / create-comment: ${{ github.event_name == 'pull_request' }} print-results: true upload-artifacts: true - debug: ${{ runner.debug == '1' }} + debug: true diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index bf7c3b654..11153b581 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -131,7 +131,8 @@ install_test_suite() { recreate_db() { shopt -s nocasematch if [[ $1 =~ ^(y|yes)$ ]]; then - mysqladmin drop "$DB_NAME" -f --user="$DB_USER" --password="$DB_PASS""$EXTRA" + # shellcheck disable=SC2086 # $EXTRA must be unquoted for word-splitting + mysqladmin drop "$DB_NAME" -f --user="$DB_USER" --password="$DB_PASS" $EXTRA create_db echo "Recreated the database ($DB_NAME)." else @@ -141,7 +142,8 @@ recreate_db() { } create_db() { - mysqladmin create "$DB_NAME" --user="$DB_USER" --password="$DB_PASS""$EXTRA" + # shellcheck disable=SC2086 # $EXTRA must be unquoted for word-splitting + mysqladmin create "$DB_NAME" --user="$DB_USER" --password="$DB_PASS" $EXTRA } install_db() { @@ -157,16 +159,17 @@ install_db() { if [ -n "$DB_HOSTNAME" ]; then if echo "$DB_SOCK_OR_PORT" | grep -qe '^[0-9]\{1,\}$'; then - EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" + EXTRA="--host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" elif [ -n "$DB_SOCK_OR_PORT" ]; then - EXTRA=" --socket=$DB_SOCK_OR_PORT" + EXTRA="--socket=$DB_SOCK_OR_PORT" elif [ -n "$DB_HOSTNAME" ]; then - EXTRA=" --host=$DB_HOSTNAME --protocol=tcp" + EXTRA="--host=$DB_HOSTNAME --protocol=tcp" fi fi # create database - if mysql --user="$DB_USER" --password="$DB_PASS""$EXTRA" --execute='show databases;' | grep -q "^${DB_NAME}$"; then + # shellcheck disable=SC2086 # $EXTRA must be unquoted for word-splitting + if mysql --user="$DB_USER" --password="$DB_PASS" $EXTRA --execute='show databases;' | grep -q "^${DB_NAME}$"; then echo "Reinstalling will delete the existing test database ($DB_NAME)" read -r -p 'Are you sure you want to proceed? [y/N]: ' DELETE_EXISTING_DB recreate_db "$DELETE_EXISTING_DB"