xwp / wp-dev-lib

DEPRECATED. Common code used during development of WordPress plugins and themes
MIT License
279 stars 65 forks source link

Improve Travis build time #82

Open JDGrimes opened 9 years ago

JDGrimes commented 9 years ago

I was working on improving the build time for a plugin a while back, and I found that there is potential here for some significant improvements:

I have implemented all of this for a plugin, and I'd be happy to submit a PR if you are interested.

westonruter commented 9 years ago

Awesome! Yes, I'd love to see a PR for this. This would really help with private repos on Travis, where build time is a premium. /cc @shadyvb

ntwb commented 9 years ago

Seeing as I'm watching this repo, a couple more suggestions in addition to @JDGrimes:

If you move to checking out the WordPress develop repo it includes everything needed for PHPUnit and WordPress tests, also checking out with Git it is significantly faster than what wp-dev-lib is currently using here via WP-CLI's wget/svn checkouts.

No need for for the MYSQLi database layer any more.

Take a peek at bbPress' .travis.yml file for some hints and jump starting a pull request ;) https://bbpress.trac.wordpress.org/browser/trunk/.travis.yml

westonruter commented 9 years ago

@ntwb thanks for the input!

For reference, here is what WP-CLI is doing: https://github.com/wp-cli/wp-cli/blob/master/templates/install-wp-tests.sh

Right, a git clone with --depth=1 I suppose would be faster than an SVN checkout, or maybe just as fast, since it would only be making one request instead of downloading/checking out multiple SVN URLs.

Will you be opening a PR to improve that install-wp-tests.sh template in WP-CLI itself? If the performance can be fixed it in WP-CLI directly, then there will be more benefit all around.