diff --git a/.gitignore b/.gitignore index c730c7f..17d28c5 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ tests/_output* selenium-server-standalone.jar codecept.phar selenium.log +tests/cache diff --git a/RoboFile.php b/RoboFile.php index 48e8daf..3be30d4 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -174,13 +174,20 @@ class RoboFile extends \Robo\Tasks return; } + // Caching cloned installations locally + if (!is_dir('tests/cache') || (time() - filemtime('tests/cache') > 60 * 60 * 24)) + { + $this->_exec('git' . $this->extension . ' clone -b staging --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/cache'); + } + // Get Joomla Clean Testing sites if (is_dir($this->cmsPath)) { $this->taskDeleteDir($this->cmsPath)->run(); } - $this->_exec('git' . $this->extension . ' clone -b staging --single-branch --depth 1 https://github.com/joomla/joomla-cms.git ' . $this->cmsPath); + // Copy cache to the testing folder + $this->_copyDir('tests/cache', $this->cmsPath); $this->say('Joomla CMS site created at ' . $this->cmsPath); }