Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh install-wp-tests.sh script #322

Open
1 task done
swissspidy opened this issue Jul 13, 2023 · 1 comment
Open
1 task done

Refresh install-wp-tests.sh script #322

swissspidy opened this issue Jul 13, 2023 · 1 comment

Comments

@swissspidy
Copy link
Member

Feature Request

Describe your use case and the problem you are facing

This script hasn't really seen any major updates, because they haven't been necessary, but I think there's still some room for improvements.

Describe the solution you'd like

Some thoughts and ideas:

  • I don't think we still need install the DB drop-in from https://github.com/markoheijnen/wp-mysqli (which just sets WP_USE_EXT_MYSQL to false) anymore.
  • There is no good way to keep install-wp-tests.sh in sync with the version here. Developers miss out on important updates.
    Even just adding a link to this repo at the top of the file, maybe with a "Last updated" date, would be helpful
  • Sometimes I had to add a User-Agent header to cURL requests as WordPress.org seemed to block requests otherwise.
    e.g. curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (K HTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" -s "$1" > "$2";
  • The script could have built-in MariaDB support, e.g. checking for mariadb-admin
@swissspidy
Copy link
Member Author

swissspidy commented Oct 3, 2023

Another thing that's annoying:

On macOS the files in the tmo wordpress and wordpress-tests-lib can get wiped sometimes, but the folders are still there. But because the script only checks if the folders exist and not the files, it won't recreate the setup.

To make that more robust, we can check if files like "$WP_TESTS_DIR"/includes/functions.php and "$WP_CORE_DIR"/wp-includs.php exist.

See swissspidy/performant-translations@108e443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant